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/ReportConflictingSymbolsCommand.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/ReportConflictingSymbolsCommand.cs')
| -rw-r--r-- | src/WixToolset.Core/Link/ReportConflictingSymbolsCommand.cs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/WixToolset.Core/Link/ReportConflictingSymbolsCommand.cs b/src/WixToolset.Core/Link/ReportConflictingSymbolsCommand.cs index ac0dd7ec..23fac864 100644 --- a/src/WixToolset.Core/Link/ReportConflictingSymbolsCommand.cs +++ b/src/WixToolset.Core/Link/ReportConflictingSymbolsCommand.cs | |||
| @@ -5,15 +5,19 @@ namespace WixToolset.Link | |||
| 5 | using System.Collections.Generic; | 5 | using System.Collections.Generic; |
| 6 | using System.Linq; | 6 | using System.Linq; |
| 7 | using WixToolset.Data; | 7 | using WixToolset.Data; |
| 8 | using WixToolset.Extensibility.Services; | ||
| 8 | 9 | ||
| 9 | public class ReportConflictingSymbolsCommand | 10 | public class ReportConflictingSymbolsCommand |
| 10 | { | 11 | { |
| 11 | public ReportConflictingSymbolsCommand(IEnumerable<Symbol> possibleConflicts, IEnumerable<IntermediateSection> resolvedSections) | 12 | public ReportConflictingSymbolsCommand(IMessaging messaging, IEnumerable<Symbol> possibleConflicts, IEnumerable<IntermediateSection> resolvedSections) |
| 12 | { | 13 | { |
| 14 | this.Messaging = messaging; | ||
| 13 | this.PossibleConflicts = possibleConflicts; | 15 | this.PossibleConflicts = possibleConflicts; |
| 14 | this.ResolvedSections = resolvedSections; | 16 | this.ResolvedSections = resolvedSections; |
| 15 | } | 17 | } |
| 16 | 18 | ||
| 19 | private IMessaging Messaging { get; } | ||
| 20 | |||
| 17 | private IEnumerable<Symbol> PossibleConflicts { get; } | 21 | private IEnumerable<Symbol> PossibleConflicts { get; } |
| 18 | 22 | ||
| 19 | private IEnumerable<IntermediateSection> ResolvedSections { get; } | 23 | private IEnumerable<IntermediateSection> ResolvedSections { get; } |
| @@ -37,11 +41,11 @@ namespace WixToolset.Link | |||
| 37 | 41 | ||
| 38 | if (actuallyReferencedDuplicateSymbols.Any()) | 42 | if (actuallyReferencedDuplicateSymbols.Any()) |
| 39 | { | 43 | { |
| 40 | Messaging.Instance.OnMessage(WixErrors.DuplicateSymbol(referencedDuplicateSymbol.Row.SourceLineNumbers, referencedDuplicateSymbol.Name)); | 44 | this.Messaging.Write(ErrorMessages.DuplicateSymbol(referencedDuplicateSymbol.Row.SourceLineNumbers, referencedDuplicateSymbol.Name)); |
| 41 | 45 | ||
| 42 | foreach (Symbol duplicate in actuallyReferencedDuplicateSymbols) | 46 | foreach (Symbol duplicate in actuallyReferencedDuplicateSymbols) |
| 43 | { | 47 | { |
| 44 | Messaging.Instance.OnMessage(WixErrors.DuplicateSymbol2(duplicate.Row.SourceLineNumbers)); | 48 | this.Messaging.Write(ErrorMessages.DuplicateSymbol2(duplicate.Row.SourceLineNumbers)); |
| 45 | } | 49 | } |
| 46 | } | 50 | } |
| 47 | } | 51 | } |
