diff options
author | Rob Mensching <rob@firegiant.com> | 2021-05-03 09:55:22 -0700 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2021-05-03 09:55:22 -0700 |
commit | ff659159e041bf6c083e6b7fcb9b726065a9dd73 (patch) | |
tree | ea95bf3d3e031edcee65de33b9e6954178be669c /src/ext/Util/wixext/UtilWarnings.cs | |
parent | 8a8a25695351ee542f08886a9d0957c78c6af366 (diff) | |
download | wix-ff659159e041bf6c083e6b7fcb9b726065a9dd73.tar.gz wix-ff659159e041bf6c083e6b7fcb9b726065a9dd73.tar.bz2 wix-ff659159e041bf6c083e6b7fcb9b726065a9dd73.zip |
Move Util.wixext into ext
Diffstat (limited to 'src/ext/Util/wixext/UtilWarnings.cs')
-rw-r--r-- | src/ext/Util/wixext/UtilWarnings.cs | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/ext/Util/wixext/UtilWarnings.cs b/src/ext/Util/wixext/UtilWarnings.cs new file mode 100644 index 00000000..b65abe45 --- /dev/null +++ b/src/ext/Util/wixext/UtilWarnings.cs | |||
@@ -0,0 +1,37 @@ | |||
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.Util | ||
4 | { | ||
5 | using System; | ||
6 | using System.Resources; | ||
7 | using WixToolset.Data; | ||
8 | |||
9 | public static class UtilWarnings | ||
10 | { | ||
11 | public static Message DeprecatedPerfCounterElement(SourceLineNumber sourceLineNumbers) | ||
12 | { | ||
13 | return Message(sourceLineNumbers, Ids.DeprecatedPerfCounterElement, "The PerfCounter element has been deprecated. Please use the PerformanceCounter element instead."); | ||
14 | } | ||
15 | |||
16 | public static Message RequiredAttributeForWindowsXP(SourceLineNumber sourceLineNumbers, string elementName, string attributeName) | ||
17 | { | ||
18 | return Message(sourceLineNumbers, Ids.RequiredAttributeForWindowsXP, "The {0}/@{1} attribute must be specified to successfully install on Windows XP. You can ignore this warning if this installation does not install on Windows XP.", elementName, attributeName); | ||
19 | } | ||
20 | |||
21 | private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args) | ||
22 | { | ||
23 | return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, format, args); | ||
24 | } | ||
25 | |||
26 | private static Message Message(SourceLineNumber sourceLineNumber, Ids id, ResourceManager resourceManager, string resourceName, params object[] args) | ||
27 | { | ||
28 | return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, resourceManager, resourceName, args); | ||
29 | } | ||
30 | |||
31 | public enum Ids | ||
32 | { | ||
33 | DeprecatedPerfCounterElement = 5153, | ||
34 | RequiredAttributeForWindowsXP = 5154, | ||
35 | } | ||
36 | } | ||
37 | } | ||