From e7b745b08c51b173c80253432a82583e73c46157 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Sun, 11 Apr 2021 17:30:46 -0700 Subject: Create backend specific error and warning locations --- src/WixToolset.Core.Burn/BurnBackendErrors.cs | 24 ++++++++++++++++++++++ src/WixToolset.Core.Burn/BurnBackendWarnings.cs | 24 ++++++++++++++++++++++ .../WindowsInstallerBackendErrors.cs | 24 ++++++++++++++++++++++ .../WindowsInstallerBackendWarnings.cs | 24 ++++++++++++++++++++++ 4 files changed, 96 insertions(+) create mode 100644 src/WixToolset.Core.Burn/BurnBackendErrors.cs create mode 100644 src/WixToolset.Core.Burn/BurnBackendWarnings.cs create mode 100644 src/WixToolset.Core.WindowsInstaller/WindowsInstallerBackendErrors.cs create mode 100644 src/WixToolset.Core.WindowsInstaller/WindowsInstallerBackendWarnings.cs (limited to 'src') diff --git a/src/WixToolset.Core.Burn/BurnBackendErrors.cs b/src/WixToolset.Core.Burn/BurnBackendErrors.cs new file mode 100644 index 00000000..106c3b31 --- /dev/null +++ b/src/WixToolset.Core.Burn/BurnBackendErrors.cs @@ -0,0 +1,24 @@ +// 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.Core.Burn +{ + using WixToolset.Data; + + internal static class BurnBackendErrors + { + //public static Message ReplaceThisWithTheFirstError(SourceLineNumber sourceLineNumbers) + //{ + // return Message(sourceLineNumbers, Ids.ReplaceThisWithTheFirstError, "format string", arg1, arg2); + //} + + private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args) + { + return new Message(sourceLineNumber, MessageLevel.Error, (int)id, format, args); + } + + public enum Ids + { + // ReplaceThisWithTheFirstError = 8000, + } + } +} diff --git a/src/WixToolset.Core.Burn/BurnBackendWarnings.cs b/src/WixToolset.Core.Burn/BurnBackendWarnings.cs new file mode 100644 index 00000000..9b2fa6c9 --- /dev/null +++ b/src/WixToolset.Core.Burn/BurnBackendWarnings.cs @@ -0,0 +1,24 @@ +// 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.Core.Burn +{ + using WixToolset.Data; + + internal static class BurnBackendWarnings + { + //public static Message ReplaceThisWithTheFirstWarning(SourceLineNumber sourceLineNumbers) + //{ + // return Message(sourceLineNumbers, Ids.ReplaceThisWithTheFirstWarning, "format string", arg1, arg2); + //} + + private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args) + { + return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, format, args); + } + + public enum Ids + { + // ReplaceThisWithTheFirstWarning = 8500, + } + } +} diff --git a/src/WixToolset.Core.WindowsInstaller/WindowsInstallerBackendErrors.cs b/src/WixToolset.Core.WindowsInstaller/WindowsInstallerBackendErrors.cs new file mode 100644 index 00000000..c1232dcc --- /dev/null +++ b/src/WixToolset.Core.WindowsInstaller/WindowsInstallerBackendErrors.cs @@ -0,0 +1,24 @@ +// 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.Core.WindowsInstaller +{ + using WixToolset.Data; + + internal static class WindowsInstallerBackendErrors + { + //public static Message ReplaceThisWithTheFirstError(SourceLineNumber sourceLineNumbers) + //{ + // return Message(sourceLineNumbers, Ids.ReplaceThisWithTheFirstError, "format string", arg1, arg2); + //} + + private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args) + { + return new Message(sourceLineNumber, MessageLevel.Error, (int)id, format, args); + } + + public enum Ids + { + // ReplaceThisWithTheFirstError = 7000, + } + } +} diff --git a/src/WixToolset.Core.WindowsInstaller/WindowsInstallerBackendWarnings.cs b/src/WixToolset.Core.WindowsInstaller/WindowsInstallerBackendWarnings.cs new file mode 100644 index 00000000..0eaadbe1 --- /dev/null +++ b/src/WixToolset.Core.WindowsInstaller/WindowsInstallerBackendWarnings.cs @@ -0,0 +1,24 @@ +// 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.Core.WindowsInstaller +{ + using WixToolset.Data; + + internal static class WindowsInstallerBackendWarnings + { + //public static Message ReplaceThisWithTheFirstWarning(SourceLineNumber sourceLineNumbers) + //{ + // return Message(sourceLineNumbers, Ids.ReplaceThisWithTheFirstWarning, "format string", arg1, arg2); + //} + + private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args) + { + return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, format, args); + } + + public enum Ids + { + // ReplaceThisWithTheFirstWarning = 7500, + } + } +} -- cgit v1.2.3-55-g6feb