зеркало из https://github.com/microsoft/TestWinRT.git
Add benchmarks for passing types. (#63)
This commit is contained in:
Родитель
1071d8ee25
Коммит
46208bcbbd
|
@ -105,6 +105,7 @@ namespace winrt::BenchmarkComponent::implementation
|
|||
nullableObject = createNullableObject();
|
||||
dictionary = createDictionary();
|
||||
list = createList();
|
||||
_type = winrt::xaml_typename<winrt::BenchmarkComponent::ClassWithMultipleInterfaces>();
|
||||
}
|
||||
|
||||
hstring ClassWithMarshalingRoutines::DefaultStringProperty()
|
||||
|
@ -234,6 +235,25 @@ namespace winrt::BenchmarkComponent::implementation
|
|||
{
|
||||
}
|
||||
|
||||
Windows::UI::Xaml::Interop::TypeName ClassWithMarshalingRoutines::NewType()
|
||||
{
|
||||
Windows::UI::Xaml::Interop::TypeName type = winrt::xaml_typename<winrt::BenchmarkComponent::ClassWithMarshalingRoutines>();
|
||||
return type;
|
||||
}
|
||||
|
||||
void ClassWithMarshalingRoutines::NewType(Windows::UI::Xaml::Interop::TypeName val)
|
||||
{
|
||||
}
|
||||
|
||||
Windows::UI::Xaml::Interop::TypeName ClassWithMarshalingRoutines::ExistingType()
|
||||
{
|
||||
return _type;
|
||||
}
|
||||
|
||||
void ClassWithMarshalingRoutines::ExistingType(Windows::UI::Xaml::Interop::TypeName val)
|
||||
{
|
||||
}
|
||||
|
||||
Windows::Foundation::IReference<int32_t> ClassWithMarshalingRoutines::NullableInt()
|
||||
{
|
||||
return IReference<INT32>(123);
|
||||
|
|
|
@ -67,7 +67,7 @@ namespace winrt::BenchmarkComponent::implementation
|
|||
BenchmarkComponent::ProvideInt _handler;
|
||||
BenchmarkComponent::ProvideInt _existingHandler = [] { return 4; };
|
||||
Windows::Foundation::Uri _uri;
|
||||
|
||||
Windows::UI::Xaml::Interop::TypeName _type;
|
||||
public:
|
||||
ClassWithMarshalingRoutines();
|
||||
|
||||
|
@ -100,6 +100,11 @@ namespace winrt::BenchmarkComponent::implementation
|
|||
Windows::Foundation::Uri ExistingUri();
|
||||
void ExistingUri(Windows::Foundation::Uri val);
|
||||
|
||||
Windows::UI::Xaml::Interop::TypeName NewType();
|
||||
void NewType(Windows::UI::Xaml::Interop::TypeName val);
|
||||
Windows::UI::Xaml::Interop::TypeName ExistingType();
|
||||
void ExistingType(Windows::UI::Xaml::Interop::TypeName val);
|
||||
|
||||
Windows::Foundation::Collections::IVector<winrt::hstring> NewList();
|
||||
|
||||
int32_t IntProperty();
|
||||
|
|
|
@ -85,6 +85,9 @@ namespace BenchmarkComponent
|
|||
Windows.Foundation.Uri NewUri{ get; set; };
|
||||
Windows.Foundation.Uri ExistingUri{ get; set; };
|
||||
|
||||
Windows.UI.Xaml.Interop.TypeName NewType{ get; set; };
|
||||
Windows.UI.Xaml.Interop.TypeName ExistingType{ get; set; };
|
||||
|
||||
Int32 IntProperty;
|
||||
event Windows.Foundation.EventHandler<Int32> IntPropertyChanged;
|
||||
event Windows.Foundation.EventHandler<Double> DoublePropertyChanged;
|
||||
|
|
|
@ -2,3 +2,4 @@
|
|||
#include <unknwn.h>
|
||||
#include <winrt/Windows.Foundation.h>
|
||||
#include <winrt/Windows.Foundation.Collections.h>
|
||||
#include <winrt/Windows.UI.Xaml.Interop.h>
|
Загрузка…
Ссылка в новой задаче