summaryrefslogtreecommitdiffstats
path: root/tools/Sandcastle/Source/MRefBuilder/ResourceHelper.cs
blob: fc5666343ff91d1eaa6fc8646f347c95931a3b82 (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
// Copyright (c) Microsoft Corporation.  All 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));
        }

    }

}