зеркало из https://github.com/microsoft/TestWinRT.git
Add benchmark for URI (#61)
* Add URI benchmark * Add existing URI too.
This commit is contained in:
Родитель
c08bbd40da
Коммит
1071d8ee25
|
@ -98,6 +98,7 @@ namespace winrt::BenchmarkComponent::implementation
|
||||||
}
|
}
|
||||||
|
|
||||||
ClassWithMarshalingRoutines::ClassWithMarshalingRoutines()
|
ClassWithMarshalingRoutines::ClassWithMarshalingRoutines()
|
||||||
|
:_uri(L"https://github.com")
|
||||||
{
|
{
|
||||||
keyValuePairObject = createKeyValuePairObject();
|
keyValuePairObject = createKeyValuePairObject();
|
||||||
arrayObject = createArrayObject();
|
arrayObject = createArrayObject();
|
||||||
|
@ -214,6 +215,25 @@ namespace winrt::BenchmarkComponent::implementation
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Windows::Foundation::Uri ClassWithMarshalingRoutines::NewUri()
|
||||||
|
{
|
||||||
|
Windows::Foundation::Uri uri(L"https://github.com");
|
||||||
|
return uri;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ClassWithMarshalingRoutines::NewUri(Windows::Foundation::Uri val)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
Windows::Foundation::Uri ClassWithMarshalingRoutines::ExistingUri()
|
||||||
|
{
|
||||||
|
return _uri;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ClassWithMarshalingRoutines::ExistingUri(Windows::Foundation::Uri val)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
Windows::Foundation::IReference<int32_t> ClassWithMarshalingRoutines::NullableInt()
|
Windows::Foundation::IReference<int32_t> ClassWithMarshalingRoutines::NullableInt()
|
||||||
{
|
{
|
||||||
return IReference<INT32>(123);
|
return IReference<INT32>(123);
|
||||||
|
|
|
@ -66,6 +66,7 @@ namespace winrt::BenchmarkComponent::implementation
|
||||||
winrt::event<Windows::Foundation::EventHandler<double_t>> _doubleChanged;
|
winrt::event<Windows::Foundation::EventHandler<double_t>> _doubleChanged;
|
||||||
BenchmarkComponent::ProvideInt _handler;
|
BenchmarkComponent::ProvideInt _handler;
|
||||||
BenchmarkComponent::ProvideInt _existingHandler = [] { return 4; };
|
BenchmarkComponent::ProvideInt _existingHandler = [] { return 4; };
|
||||||
|
Windows::Foundation::Uri _uri;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ClassWithMarshalingRoutines();
|
ClassWithMarshalingRoutines();
|
||||||
|
@ -94,6 +95,11 @@ namespace winrt::BenchmarkComponent::implementation
|
||||||
BenchmarkComponent::WrappedClass NewWrappedClassObject();
|
BenchmarkComponent::WrappedClass NewWrappedClassObject();
|
||||||
void NewWrappedClassObject(BenchmarkComponent::WrappedClass val);
|
void NewWrappedClassObject(BenchmarkComponent::WrappedClass val);
|
||||||
|
|
||||||
|
Windows::Foundation::Uri NewUri();
|
||||||
|
void NewUri(Windows::Foundation::Uri val);
|
||||||
|
Windows::Foundation::Uri ExistingUri();
|
||||||
|
void ExistingUri(Windows::Foundation::Uri val);
|
||||||
|
|
||||||
Windows::Foundation::Collections::IVector<winrt::hstring> NewList();
|
Windows::Foundation::Collections::IVector<winrt::hstring> NewList();
|
||||||
|
|
||||||
int32_t IntProperty();
|
int32_t IntProperty();
|
||||||
|
|
|
@ -82,6 +82,9 @@ namespace BenchmarkComponent
|
||||||
|
|
||||||
WrappedClass NewWrappedClassObject{ get; set; };
|
WrappedClass NewWrappedClassObject{ get; set; };
|
||||||
|
|
||||||
|
Windows.Foundation.Uri NewUri{ get; set; };
|
||||||
|
Windows.Foundation.Uri ExistingUri{ get; set; };
|
||||||
|
|
||||||
Int32 IntProperty;
|
Int32 IntProperty;
|
||||||
event Windows.Foundation.EventHandler<Int32> IntPropertyChanged;
|
event Windows.Foundation.EventHandler<Int32> IntPropertyChanged;
|
||||||
event Windows.Foundation.EventHandler<Double> DoublePropertyChanged;
|
event Windows.Foundation.EventHandler<Double> DoublePropertyChanged;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче