diff options
Diffstat (limited to 'src/ext/PowerShell/wixext/PSErrors.cs')
| -rw-r--r-- | src/ext/PowerShell/wixext/PSErrors.cs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/ext/PowerShell/wixext/PSErrors.cs b/src/ext/PowerShell/wixext/PSErrors.cs new file mode 100644 index 00000000..704cf5cd --- /dev/null +++ b/src/ext/PowerShell/wixext/PSErrors.cs | |||
| @@ -0,0 +1,30 @@ | |||
| 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.PowerShell | ||
| 4 | { | ||
| 5 | using System.Resources; | ||
| 6 | using WixToolset.Data; | ||
| 7 | |||
| 8 | public static class PSErrors | ||
| 9 | { | ||
| 10 | public static Message NeitherIdSpecified(SourceLineNumber sourceLineNumbers, string element) | ||
| 11 | { | ||
| 12 | return Message(sourceLineNumbers, Ids.NeitherIdSpecified, "Either the {0}/@FileId attribute must be specified if nested under a SnapIn element, or the {0}/@SnapIn attribute must be specified if nested under under a File element.", element); | ||
| 13 | } | ||
| 14 | |||
| 15 | private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args) | ||
| 16 | { | ||
| 17 | return new Message(sourceLineNumber, MessageLevel.Error, (int)id, format, args); | ||
| 18 | } | ||
| 19 | |||
| 20 | private static Message Message(SourceLineNumber sourceLineNumber, Ids id, ResourceManager resourceManager, string resourceName, params object[] args) | ||
| 21 | { | ||
| 22 | return new Message(sourceLineNumber, MessageLevel.Error, (int)id, resourceManager, resourceName, args); | ||
| 23 | } | ||
| 24 | |||
| 25 | public enum Ids | ||
| 26 | { | ||
| 27 | NeitherIdSpecified = 5301, | ||
| 28 | } | ||
| 29 | } | ||
| 30 | } | ||
