From 155a6e96346e0cb3d9ab6f5372fa29b46ebaee89 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Tue, 19 Dec 2017 12:25:40 -0800 Subject: Integrate simplified message handling --- src/WixToolset.Core/Bind/ResolveFieldsCommand.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/WixToolset.Core/Bind/ResolveFieldsCommand.cs') diff --git a/src/WixToolset.Core/Bind/ResolveFieldsCommand.cs b/src/WixToolset.Core/Bind/ResolveFieldsCommand.cs index 9253f352..e8c90956 100644 --- a/src/WixToolset.Core/Bind/ResolveFieldsCommand.cs +++ b/src/WixToolset.Core/Bind/ResolveFieldsCommand.cs @@ -7,12 +7,15 @@ namespace WixToolset.Core.Bind using WixToolset.Data; using WixToolset.Data.Bind; using WixToolset.Extensibility; + using WixToolset.Extensibility.Services; /// /// Resolve source fields in the tables included in the output /// internal class ResolveFieldsCommand { + public IMessaging Messaging { private get; set; } + public bool BuildingPatch { private get; set; } public IBindVariableResolver BindVariableResolver { private get; set; } @@ -75,7 +78,7 @@ namespace WixToolset.Core.Bind } // Move to next row if we've hit an error resolving variables. - if (Messaging.Instance.EncounteredError) // TODO: make this error handling more specific to just the failure to resolve variables in this field. + if (this.Messaging.EncounteredError) // TODO: make this error handling more specific to just the failure to resolve variables in this field. { continue; } @@ -151,7 +154,7 @@ namespace WixToolset.Core.Bind catch (WixFileNotFoundException) { // display the error with source line information - Messaging.Instance.OnMessage(WixErrors.FileNotFound(row.SourceLineNumbers, objectField.Path)); + this.Messaging.Write(ErrorMessages.FileNotFound(row.SourceLineNumbers, objectField.Path)); } } @@ -208,7 +211,7 @@ namespace WixToolset.Core.Bind catch (WixFileNotFoundException) { // display the error with source line information - Messaging.Instance.OnMessage(WixErrors.FileNotFound(row.SourceLineNumbers, (string)objectField.PreviousData)); + Messaging.Instance.Write(WixErrors.FileNotFound(row.SourceLineNumbers, (string)objectField.PreviousData)); } } } -- cgit v1.2.3-55-g6feb