2019-06-04 23:55:27 +02:00
|
|
|
/*++
|
|
|
|
Copyright (c) Microsoft Corporation
|
|
|
|
Licensed under the MIT license.
|
|
|
|
|
|
|
|
Module Name:
|
|
|
|
- Utils.h
|
|
|
|
|
|
|
|
Abstract:
|
|
|
|
- Helpers for the TerminalApp project
|
|
|
|
Author(s):
|
|
|
|
- Mike Griese - May 2019
|
|
|
|
|
|
|
|
--*/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
std::wstring GetWstringFromJson(const Json::Value& json);
|
|
|
|
|
|
|
|
// Method Description:
|
|
|
|
// - Create a std::string from a string_view. We do this because we can't look
|
|
|
|
// up a key in a Json::Value with a string_view directly, so instead we'll use
|
|
|
|
// this helper. Should a string_view lookup ever be added to jsoncpp, we can
|
|
|
|
// remove this entirely.
|
|
|
|
// Arguments:
|
|
|
|
// - key: the string_view to build a string from
|
|
|
|
// Return Value:
|
|
|
|
// - a std::string to use for looking up a value from a Json::Value
|
|
|
|
inline std::string JsonKey(const std::string_view key)
|
|
|
|
{
|
|
|
|
return static_cast<std::string>(key);
|
|
|
|
}
|
2019-08-15 01:12:14 +02:00
|
|
|
|
|
|
|
winrt::Windows::UI::Xaml::Controls::IconElement GetColoredIcon(const winrt::hstring& path);
|