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/Link/FindEntrySectionAndLoadSymbolsCommand.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/Link/FindEntrySectionAndLoadSymbolsCommand.cs')
-rw-r--r-- | src/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs b/src/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs index 00613ca1..daf3e878 100644 --- a/src/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs +++ b/src/WixToolset.Core/Link/FindEntrySectionAndLoadSymbolsCommand.cs | |||
@@ -6,14 +6,18 @@ namespace WixToolset.Core.Link | |||
6 | using System.Collections.Generic; | 6 | using System.Collections.Generic; |
7 | using System.Linq; | 7 | using System.Linq; |
8 | using WixToolset.Data; | 8 | using WixToolset.Data; |
9 | using WixToolset.Extensibility.Services; | ||
9 | 10 | ||
10 | internal class FindEntrySectionAndLoadSymbolsCommand : ICommand | 11 | internal class FindEntrySectionAndLoadSymbolsCommand |
11 | { | 12 | { |
12 | public FindEntrySectionAndLoadSymbolsCommand(IEnumerable<IntermediateSection> sections) | 13 | public FindEntrySectionAndLoadSymbolsCommand(IMessaging messaging, IEnumerable<IntermediateSection> sections) |
13 | { | 14 | { |
15 | this.Messaging = messaging; | ||
14 | this.Sections = sections; | 16 | this.Sections = sections; |
15 | } | 17 | } |
16 | 18 | ||
19 | private IMessaging Messaging { get; } | ||
20 | |||
17 | private IEnumerable<IntermediateSection> Sections { get; } | 21 | private IEnumerable<IntermediateSection> Sections { get; } |
18 | 22 | ||
19 | /// <summary> | 23 | /// <summary> |
@@ -55,7 +59,7 @@ namespace WixToolset.Core.Link | |||
55 | //if (SectionType.Unknown != expectedEntrySectionType && section.Type != expectedEntrySectionType) | 59 | //if (SectionType.Unknown != expectedEntrySectionType && section.Type != expectedEntrySectionType) |
56 | //{ | 60 | //{ |
57 | // string outputExtension = Output.GetExtension(this.ExpectedOutputType); | 61 | // string outputExtension = Output.GetExtension(this.ExpectedOutputType); |
58 | // Messaging.Instance.OnMessage(WixWarnings.UnexpectedEntrySection(section.SourceLineNumbers, section.Type.ToString(), expectedEntrySectionType.ToString(), outputExtension)); | 62 | // this.Messaging.Write(WixWarnings.UnexpectedEntrySection(section.SourceLineNumbers, section.Type.ToString(), expectedEntrySectionType.ToString(), outputExtension)); |
59 | //} | 63 | //} |
60 | 64 | ||
61 | if (null == this.EntrySection) | 65 | if (null == this.EntrySection) |
@@ -64,8 +68,8 @@ namespace WixToolset.Core.Link | |||
64 | } | 68 | } |
65 | else | 69 | else |
66 | { | 70 | { |
67 | Messaging.Instance.OnMessage(WixErrors.MultipleEntrySections(this.EntrySection.Tuples.FirstOrDefault()?.SourceLineNumbers, this.EntrySection.Id, section.Id)); | 71 | this.Messaging.Write(ErrorMessages.MultipleEntrySections(this.EntrySection.Tuples.FirstOrDefault()?.SourceLineNumbers, this.EntrySection.Id, section.Id)); |
68 | Messaging.Instance.OnMessage(WixErrors.MultipleEntrySections2(section.Tuples.FirstOrDefault()?.SourceLineNumbers)); | 72 | this.Messaging.Write(ErrorMessages.MultipleEntrySections2(section.Tuples.FirstOrDefault()?.SourceLineNumbers)); |
69 | } | 73 | } |
70 | } | 74 | } |
71 | 75 | ||