summaryrefslogtreecommitdiffstats
path: root/tools/Sandcastle/Source/MRefBuilder/ResourceHelper.cs
blob: ba2a149b58eb362076fec4ccebd64d8d31391b59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Copyright © Microsoft Corporation.
// This source file is subject to the Microsoft Permissive License.
// See http://www.microsoft.com/resources/sharedsource/licensingbasics/sharedsourcelicenses.mspx.
// All other rights reserved.

using System.IO;
using System.Reflection;
using System.Resources;

namespace Microsoft.Ddue.Tools.DxCoach {

    internal sealed class ResourceHelper {

        private static ResourceManager manager = new ResourceManager("TextStrings", Assembly.GetExecutingAssembly());

        private ResourceHelper() { }

        public static Stream GetStream(string file) {
            return (Assembly.GetExecutingAssembly().GetManifestResourceStream(file));
        }

        public static string GetString(string key) {
            return (manager.GetString(key));
        }

    }

}