| 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 | } |