зеркало из https://github.com/microsoft/TestWinRT.git
Add more default properties (#55)
This commit is contained in:
Родитель
62c15ff001
Коммит
d8df184329
|
@ -12,6 +12,30 @@ namespace winrt::BenchmarkComponent::implementation
|
|||
{
|
||||
}
|
||||
|
||||
Windows::Foundation::IInspectable ClassWithMultipleInterfaces::NewObject() const
|
||||
{
|
||||
return make<ClassWithMarshalingRoutines>();
|
||||
}
|
||||
|
||||
Windows::Foundation::IInspectable ClassWithMultipleInterfaces::DefaultObjectProperty() const
|
||||
{
|
||||
return m_object;
|
||||
}
|
||||
|
||||
void ClassWithMultipleInterfaces::DefaultObjectProperty(Windows::Foundation::IInspectable const& value)
|
||||
{
|
||||
m_object = value;
|
||||
}
|
||||
|
||||
hstring ClassWithMultipleInterfaces::DefaultStringProperty() const
|
||||
{
|
||||
return m_string;
|
||||
}
|
||||
void ClassWithMultipleInterfaces::DefaultStringProperty(hstring const& value)
|
||||
{
|
||||
m_string = value;
|
||||
}
|
||||
|
||||
int32_t ClassWithMultipleInterfaces::IntProperty()
|
||||
{
|
||||
return 1;
|
||||
|
|
|
@ -25,6 +25,16 @@ namespace winrt::BenchmarkComponent::implementation
|
|||
void DefaultIntProperty(int32_t val);
|
||||
void DefaultBoolProperty(bool val);
|
||||
void DefaultDoubleProperty(double val);
|
||||
Windows::Foundation::IInspectable DefaultObjectProperty() const;
|
||||
void DefaultObjectProperty(Windows::Foundation::IInspectable const& value);
|
||||
hstring DefaultStringProperty() const;
|
||||
void DefaultStringProperty(hstring const& value);
|
||||
|
||||
Windows::Foundation::IInspectable NewObject() const;
|
||||
|
||||
private:
|
||||
Windows::Foundation::IInspectable m_object;
|
||||
hstring m_string;
|
||||
};
|
||||
|
||||
struct WrappedClass : WrappedClassT<WrappedClass>
|
||||
|
|
|
@ -33,6 +33,9 @@ namespace BenchmarkComponent
|
|||
Int32 DefaultIntProperty{ get; set; };
|
||||
Boolean DefaultBoolProperty{ get; set; };
|
||||
Double DefaultDoubleProperty{ get; set; };
|
||||
Object DefaultObjectProperty{ get; set; };
|
||||
String DefaultStringProperty{ get; set; };
|
||||
Object NewObject();
|
||||
}
|
||||
|
||||
[default_interface]
|
||||
|
|
Загрузка…
Ссылка в новой задаче