aboutsummaryrefslogtreecommitdiff
path: root/src/tools/heat/Data/HarvesterVerboses.cs
blob: 72de2351e817e531cacb433270df717a9fd4308b (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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.

namespace WixToolset.Harvesters.Data
{
    using System;
    using System.Resources;
    using WixToolset.Data;

#pragma warning disable 1591 // TODO: add documentation
    public static class HarvesterVerboses
    {
        public static Message FoundToolsVersion(string toolsVersion)
        {
            return Message(null, Ids.FoundToolsVersion, "Found ToolsVersion {0} inside project file.", toolsVersion);
        }

        public static Message HarvestingAssembly(string fileName)
        {
            return Message(null, Ids.HarvestingAssembly, "Trying to harvest {0} as an assembly.", fileName);
        }

        public static Message HarvestingSelfReg(string fileName)
        {
            return Message(null, Ids.HarvestingSelfReg, "Trying to harvest self-registration information from native DLL {0}.", fileName);
        }

        public static Message HarvestingTypeLib(string fileName)
        {
            return Message(null, Ids.HarvestingTypeLib, "Trying to harvest type-library information from native DLL {0}.", fileName);
        }

        public static Message LoadingProjectWithBinPath(string msbuildBinPath)
        {
            return Message(null, Ids.LoadingProjectWithBinPath, "Loading project using MSBuild bin path {0}.", msbuildBinPath);
        }

        public static Message LoadingProjectWithVersion(string msbuildVersion)
        {
            return Message(null, Ids.LoadingProjectWithVersion, "Loading project using MSBuild version {0}.", msbuildVersion);
        }

        private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args)
        {
            return new Message(sourceLineNumber, MessageLevel.Verbose, (int)id, format, args);
        }

        private static Message Message(SourceLineNumber sourceLineNumber, Ids id, ResourceManager resourceManager, string resourceName, params object[] args)
        {
            return new Message(sourceLineNumber, MessageLevel.Verbose, (int)id, resourceManager, resourceName, args);
        }

        public enum Ids
        {
            HarvestingAssembly = 5100,
            HarvestingSelfReg = 5101,
            HarvestingTypeLib = 5102,
            LoadingProjectWithVersion = 5378,
            FoundToolsVersion = 5379,
            LoadingProjectWithBinPath = 5380,
        }
    }
}