/ src / modules / cmdpal / ext / Microsoft.CmdPal.Ext.Shell / Properties / ResourceLoaderInstance.cs
ResourceLoaderInstance.cs
1 // Copyright (c) Microsoft Corporation 2 // The Microsoft Corporation licenses this file to you under the MIT license. 3 // See the LICENSE file in the project root for more information. 4 5 namespace Microsoft.CmdPal.Ext.Shell; 6 7 internal static class ResourceLoaderInstance 8 { 9 public static string GetString(string resourceKey) 10 { 11 return Properties.Resources.ResourceManager.GetString(resourceKey, Properties.Resources.Culture) ?? throw new InvalidOperationException($"Resource key '{resourceKey}' not found."); 12 } 13 }