| 1 | // 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. |
| 2 | |
| 3 | namespace WixToolset.Harvesters.Data |
| 4 | { |
| 5 | using System; |
| 6 | using System.Resources; |
| 7 | using WixToolset.Data; |
| 8 | |
| 9 | #pragma warning disable 1591 // TODO: add documentation |
| 10 | public static class HarvesterVerboses |
| 11 | { |
| 12 | public static Message FoundToolsVersion(string toolsVersion) |
| 13 | { |
| 14 | return Message(null, Ids.FoundToolsVersion, "Found ToolsVersion {0} inside project file.", toolsVersion); |
| 15 | } |
| 16 | |
| 17 | public static Message HarvestingAssembly(string fileName) |
| 18 | { |
| 19 | return Message(null, Ids.HarvestingAssembly, "Trying to harvest {0} as an assembly.", fileName); |
| 20 | } |
| 21 | |
| 22 | public static Message HarvestingSelfReg(string fileName) |
| 23 | { |
| 24 | return Message(null, Ids.HarvestingSelfReg, "Trying to harvest self-registration information from native DLL {0}.", fileName); |
| 25 | } |
| 26 | |
| 27 | public static Message HarvestingTypeLib(string fileName) |
| 28 | { |
| 29 | return Message(null, Ids.HarvestingTypeLib, "Trying to harvest type-library information from native DLL {0}.", fileName); |
| 30 | } |
| 31 | |
| 32 | public static Message LoadingProjectWithBinPath(string msbuildBinPath) |
| 33 | { |
| 34 | return Message(null, Ids.LoadingProjectWithBinPath, "Loading project using MSBuild bin path {0}.", msbuildBinPath); |
| 35 | } |
| 36 | |
| 37 | public static Message LoadingProjectWithVersion(string msbuildVersion) |
| 38 | { |
| 39 | return Message(null, Ids.LoadingProjectWithVersion, "Loading project using MSBuild version {0}.", msbuildVersion); |
| 40 | } |
| 41 | |
| 42 | private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args) |
| 43 | { |
| 44 | return new Message(sourceLineNumber, MessageLevel.Verbose, (int)id, format, args); |
| 45 | } |
| 46 | |
| 47 | private static Message Message(SourceLineNumber sourceLineNumber, Ids id, ResourceManager resourceManager, string resourceName, params object[] args) |
| 48 | { |
| 49 | return new Message(sourceLineNumber, MessageLevel.Verbose, (int)id, resourceManager, resourceName, args); |
| 50 | } |
| 51 | |
| 52 | public enum Ids |
| 53 | { |
| 54 | HarvestingAssembly = 5100, |
| 55 | HarvestingSelfReg = 5101, |
| 56 | HarvestingTypeLib = 5102, |
| 57 | LoadingProjectWithVersion = 5378, |
| 58 | FoundToolsVersion = 5379, |
| 59 | LoadingProjectWithBinPath = 5380, |
| 60 | } |
| 61 | } |
| 62 | } |