InstallingPackageView.h (1833B)
1 // Copyright (c) Microsoft Corporation. 2 // Licensed under the MIT License. 3 #pragma once 4 #include "InstallingPackageView.g.h" 5 6 namespace winrt::AppInstallerCaller::implementation 7 { 8 struct InstallingPackageView : InstallingPackageViewT<InstallingPackageView> 9 { 10 using AsyncOperation_t = winrt::Windows::Foundation::IAsyncOperationWithProgress<winrt::Microsoft::Management::Deployment::InstallResult, winrt::Microsoft::Management::Deployment::InstallProgress>; 11 12 InstallingPackageView() = default; 13 14 winrt::Microsoft::Management::Deployment::CatalogPackage Package(); 15 void Package(winrt::Microsoft::Management::Deployment::CatalogPackage const& value); 16 AsyncOperation_t AsyncOperation(); 17 void AsyncOperation(AsyncOperation_t const& value); 18 double Progress(); 19 void Progress(double value); 20 hstring StatusText(); 21 void StatusText(hstring const& value); 22 winrt::Windows::UI::Core::CoreDispatcher Dispatcher(); 23 void Dispatcher(winrt::Windows::UI::Core::CoreDispatcher const& value); 24 winrt::event_token PropertyChanged(Windows::UI::Xaml::Data::PropertyChangedEventHandler const& value); 25 void PropertyChanged(winrt::event_token const& token); 26 27 private: 28 winrt::Microsoft::Management::Deployment::CatalogPackage m_package{ nullptr }; 29 AsyncOperation_t m_asyncOperation{ nullptr }; 30 double m_progress = 0; 31 hstring m_text; 32 winrt::Windows::UI::Core::CoreDispatcher m_dispatcher{ nullptr }; 33 winrt::event<Windows::UI::Xaml::Data::PropertyChangedEventHandler> m_propertyChanged; 34 }; 35 } 36 37 namespace winrt::AppInstallerCaller::factory_implementation 38 { 39 struct InstallingPackageView : InstallingPackageViewT<InstallingPackageView, implementation::InstallingPackageView> 40 { 41 }; 42 }