diff options
| author | Rob Mensching <rob@firegiant.com> | 2017-12-19 12:25:40 -0800 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2017-12-19 12:25:40 -0800 |
| commit | 155a6e96346e0cb3d9ab6f5372fa29b46ebaee89 (patch) | |
| tree | 59d1f151bfde8068b6014b05b5c8cfea3402c974 /src/WixToolset.Core/WixGenericMessageEventArgs.cs | |
| parent | 6f1665ed759b31bd095f186f9239232c653597cd (diff) | |
| download | wix-155a6e96346e0cb3d9ab6f5372fa29b46ebaee89.tar.gz wix-155a6e96346e0cb3d9ab6f5372fa29b46ebaee89.tar.bz2 wix-155a6e96346e0cb3d9ab6f5372fa29b46ebaee89.zip | |
Integrate simplified message handling
Diffstat (limited to 'src/WixToolset.Core/WixGenericMessageEventArgs.cs')
| -rw-r--r-- | src/WixToolset.Core/WixGenericMessageEventArgs.cs | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/src/WixToolset.Core/WixGenericMessageEventArgs.cs b/src/WixToolset.Core/WixGenericMessageEventArgs.cs deleted file mode 100644 index 2c1d4705..00000000 --- a/src/WixToolset.Core/WixGenericMessageEventArgs.cs +++ /dev/null | |||
| @@ -1,45 +0,0 @@ | |||
| 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 | ||
| 4 | { | ||
| 5 | using System; | ||
| 6 | using System.Resources; | ||
| 7 | using WixToolset.Data; | ||
| 8 | |||
| 9 | /// <summary> | ||
| 10 | /// Generic event args for message events. | ||
| 11 | /// </summary> | ||
| 12 | public class WixGenericMessageEventArgs : MessageEventArgs | ||
| 13 | { | ||
| 14 | /// <summary> | ||
| 15 | /// Creates a new generc message event arg. | ||
| 16 | /// </summary> | ||
| 17 | /// <param name="sourceLineNumbers">Source line numbers for the message.</param> | ||
| 18 | /// <param name="id">Id for the message.</param> | ||
| 19 | /// <param name="level">Level for the message.</param> | ||
| 20 | /// <param name="format">Format message for arguments.</param> | ||
| 21 | /// <param name="messageArgs">Arguments for the format string.</param> | ||
| 22 | public WixGenericMessageEventArgs(SourceLineNumber sourceLineNumbers, int id, MessageLevel level, string format, params object[] messageArgs) | ||
| 23 | : base(sourceLineNumbers, id, format, messageArgs) | ||
| 24 | { | ||
| 25 | base.Level = level; | ||
| 26 | base.ResourceManager = new GenericResourceManager(); | ||
| 27 | } | ||
| 28 | |||
| 29 | /// <summary> | ||
| 30 | /// Private resource manager to return our format message as the "localized" string untouched. | ||
| 31 | /// </summary> | ||
| 32 | private class GenericResourceManager : ResourceManager | ||
| 33 | { | ||
| 34 | /// <summary> | ||
| 35 | /// Passes the "resource name" through as the format string. | ||
| 36 | /// </summary> | ||
| 37 | /// <param name="name">Format message that is passed in as the resource name.</param> | ||
| 38 | /// <returns>The name.</returns> | ||
| 39 | public override string GetString(string name) | ||
| 40 | { | ||
| 41 | return name; | ||
| 42 | } | ||
| 43 | } | ||
| 44 | } | ||
| 45 | } | ||
