terminal/src/cascadia/WinRTUtils/ScopedResourceLoader.h
Michael Niksa 9cae3c439e Enable Audit Mode for WinRTUtils (#3923)
## Summary of the Pull Request
Turns on Audit for WinRTUtils, fixes audit failures.

## PR Checklist
* [x] I work here
* [x] Still builds
* [x] Am core contributor.

## Validation Steps Performed
Built it.
2019-12-12 13:28:32 +00:00

18 lines
655 B
C++

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
#pragma once
class ScopedResourceLoader
{
public:
ScopedResourceLoader(const std::wstring_view resourceLocatorBase);
winrt::Windows::ApplicationModel::Resources::Core::ResourceMap GetResourceMap() const noexcept;
winrt::hstring GetLocalizedString(const std::wstring_view resourceName) const;
bool HasResourceWithName(const std::wstring_view resourceName) const;
private:
winrt::Windows::ApplicationModel::Resources::Core::ResourceMap _resourceMap;
winrt::Windows::ApplicationModel::Resources::Core::ResourceContext _resourceContext;
};