mirror of
https://github.com/microsoft/terminal.git
synced 2025-12-10 00:48:23 -06:00
We originally needed this library (or a separate DLL in our own project) to handle hooking up the XAML resource loader to the providers that our application needed. It was introduced in its nascent form in 2019, in a PR titled "Make XAML files work." It appears we no longer need it, and the provider hookup is being handled by our `AppT2` base class override. I've tested this in Windows 10 Vb running unpackaged, and it seems to work totally fine. Crazy. Removing this dependency saves us a couple hundred kilobytes on disk and removes one consumer of the App CRT from our package.
40 lines
1.0 KiB
C++
40 lines
1.0 KiB
C++
// Copyright (c) Microsoft Corporation.
|
|
// Licensed under the MIT license.
|
|
|
|
#pragma once
|
|
|
|
#include "App.g.h"
|
|
#include "App.base.h"
|
|
|
|
namespace winrt::SampleApp::implementation
|
|
{
|
|
struct App : AppT2<App>
|
|
{
|
|
public:
|
|
App();
|
|
void Initialize();
|
|
void Close();
|
|
void OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs const&);
|
|
|
|
bool IsDisposed() const
|
|
{
|
|
return _bIsClosed;
|
|
}
|
|
|
|
SampleApp::SampleAppLogic Logic();
|
|
|
|
private:
|
|
bool _isUwp = false;
|
|
winrt::Windows::UI::Xaml::Hosting::WindowsXamlManager _windowsXamlManager = nullptr;
|
|
winrt::Windows::Foundation::Collections::IVector<winrt::Windows::UI::Xaml::Markup::IXamlMetadataProvider> _providers = winrt::single_threaded_vector<Windows::UI::Xaml::Markup::IXamlMetadataProvider>();
|
|
bool _bIsClosed = false;
|
|
};
|
|
}
|
|
|
|
namespace winrt::SampleApp::factory_implementation
|
|
{
|
|
struct App : AppT<App, implementation::App>
|
|
{
|
|
};
|
|
}
|