зеркало из https://github.com/microsoft/TestWinRT.git
Add another event to benchmark (#56)
This commit is contained in:
Родитель
d8df184329
Коммит
26177a8cca
|
@ -240,4 +240,16 @@ namespace winrt::BenchmarkComponent::implementation
|
|||
_int = provideInt();
|
||||
}
|
||||
|
||||
winrt::event_token ClassWithMarshalingRoutines::DoublePropertyChanged(EventHandler<double_t> const& handler)
|
||||
{
|
||||
return _doubleChanged.add(handler);
|
||||
}
|
||||
void ClassWithMarshalingRoutines::DoublePropertyChanged(winrt::event_token const& token) noexcept
|
||||
{
|
||||
_doubleChanged.remove(token);
|
||||
}
|
||||
void ClassWithMarshalingRoutines::RaiseDoubleChanged()
|
||||
{
|
||||
_doubleChanged(*this, _int);
|
||||
}
|
||||
}
|
|
@ -60,6 +60,7 @@ namespace winrt::BenchmarkComponent::implementation
|
|||
|
||||
int32_t _int = 0;
|
||||
winrt::event<Windows::Foundation::EventHandler<int32_t>> _intChanged;
|
||||
winrt::event<Windows::Foundation::EventHandler<double_t>> _doubleChanged;
|
||||
|
||||
public:
|
||||
ClassWithMarshalingRoutines();
|
||||
|
@ -95,6 +96,10 @@ namespace winrt::BenchmarkComponent::implementation
|
|||
void RaiseIntChanged();
|
||||
void CallForInt(BenchmarkComponent::ProvideInt const& provideInt);
|
||||
|
||||
winrt::event_token DoublePropertyChanged(Windows::Foundation::EventHandler<double_t> const& handler);
|
||||
void DoublePropertyChanged(winrt::event_token const& token) noexcept;
|
||||
void RaiseDoubleChanged();
|
||||
|
||||
Windows::Foundation::Collections::IMap<winrt::hstring, BenchmarkComponent::WrappedClass> ExistingDictionary();
|
||||
};
|
||||
}
|
||||
|
|
|
@ -65,7 +65,9 @@ namespace BenchmarkComponent
|
|||
|
||||
Int32 IntProperty;
|
||||
event Windows.Foundation.EventHandler<Int32> IntPropertyChanged;
|
||||
event Windows.Foundation.EventHandler<Double> DoublePropertyChanged;
|
||||
void RaiseIntChanged();
|
||||
void RaiseDoubleChanged();
|
||||
void CallForInt(ProvideInt provideInt);
|
||||
|
||||
Windows.Foundation.Collections.IMap<String, WrappedClass> ExistingDictionary{ get; };
|
||||
|
|
Загрузка…
Ссылка в новой задаче