-
Notifications
You must be signed in to change notification settings - Fork 16
/
NullValues.h
27 lines (25 loc) · 1.37 KB
/
NullValues.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#pragma once
#include "NullValues.g.h"
namespace winrt::test_component::implementation
{
struct NullValues
{
NullValues() = default;
static bool IsObjectNull(winrt::Windows::Foundation::IInspectable const& value) { return value == nullptr; }
static bool IsInterfaceNull(winrt::Windows::Foundation::IClosable const& value) { return value == nullptr; }
static bool IsGenericInterfaceNull(winrt::Windows::Foundation::Collections::IVector<hstring> const& value) { return value == nullptr; }
static bool IsClassNull(winrt::test_component::NoopClosable const& value) { return value == nullptr; }
static bool IsDelegateNull(winrt::test_component::VoidToVoidDelegate const& value) { return value == nullptr; }
static winrt::Windows::Foundation::IInspectable GetNullObject() { return nullptr; }
static winrt::Windows::Foundation::IClosable GetNullInterface() { return nullptr; }
static winrt::Windows::Foundation::Collections::IVector<hstring> GetNullGenericInterface() { return nullptr; }
static winrt::test_component::NoopClosable GetNullClass() { return nullptr; }
static winrt::test_component::VoidToVoidDelegate GetNullDelegate() { return nullptr; }
};
}
namespace winrt::test_component::factory_implementation
{
struct NullValues : NullValuesT<NullValues, implementation::NullValues>
{
};
}