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.WindowsInstaller/Bind/BindTransformCommand.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.WindowsInstaller/Bind/BindTransformCommand.cs')
| -rw-r--r-- | src/WixToolset.Core.WindowsInstaller/Bind/BindTransformCommand.cs | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/BindTransformCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/BindTransformCommand.cs index 49440cea..800ebac0 100644 --- a/src/WixToolset.Core.WindowsInstaller/Bind/BindTransformCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Bind/BindTransformCommand.cs | |||
| @@ -6,11 +6,12 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 6 | using System.Collections.Generic; | 6 | using System.Collections.Generic; |
| 7 | using System.Globalization; | 7 | using System.Globalization; |
| 8 | using System.IO; | 8 | using System.IO; |
| 9 | using WixToolset.Core.Native; | ||
| 9 | using WixToolset.Data; | 10 | using WixToolset.Data; |
| 11 | using WixToolset.Data.WindowsInstaller; | ||
| 10 | using WixToolset.Extensibility; | 12 | using WixToolset.Extensibility; |
| 13 | using WixToolset.Extensibility.Services; | ||
| 11 | using WixToolset.Msi; | 14 | using WixToolset.Msi; |
| 12 | using WixToolset.Core.Native; | ||
| 13 | using WixToolset.Data.WindowsInstaller; | ||
| 14 | 15 | ||
| 15 | internal class BindTransformCommand | 16 | internal class BindTransformCommand |
| 16 | { | 17 | { |
| @@ -22,6 +23,8 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 22 | 23 | ||
| 23 | public Output Transform { private get; set; } | 24 | public Output Transform { private get; set; } |
| 24 | 25 | ||
| 26 | public IMessaging Messaging { private get; set; } | ||
| 27 | |||
| 25 | public string OutputPath { private get; set; } | 28 | public string OutputPath { private get; set; } |
| 26 | 29 | ||
| 27 | public void Execute() | 30 | public void Execute() |
| @@ -197,7 +200,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 197 | if (((int)TransformFlags.ValidateUpgradeCode & transformFlags) != 0 && | 200 | if (((int)TransformFlags.ValidateUpgradeCode & transformFlags) != 0 && |
| 198 | (String.IsNullOrEmpty(targetUpgradeCode) || String.IsNullOrEmpty(updatedUpgradeCode))) | 201 | (String.IsNullOrEmpty(targetUpgradeCode) || String.IsNullOrEmpty(updatedUpgradeCode))) |
| 199 | { | 202 | { |
| 200 | Messaging.Instance.OnMessage(WixErrors.BothUpgradeCodesRequired()); | 203 | this.Messaging.Write(ErrorMessages.BothUpgradeCodesRequired()); |
| 201 | } | 204 | } |
| 202 | 205 | ||
| 203 | string emptyFile = null; | 206 | string emptyFile = null; |
| @@ -276,7 +279,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 276 | { | 279 | { |
| 277 | if (RowOperation.Add == fileRow.Operation) | 280 | if (RowOperation.Add == fileRow.Operation) |
| 278 | { | 281 | { |
| 279 | Messaging.Instance.OnMessage(WixErrors.InvalidAddedFileRowWithoutSequence(fileRow.SourceLineNumbers, (string)fileRow[0])); | 282 | this.Messaging.Write(ErrorMessages.InvalidAddedFileRowWithoutSequence(fileRow.SourceLineNumbers, (string)fileRow[0])); |
| 280 | break; | 283 | break; |
| 281 | } | 284 | } |
| 282 | 285 | ||
| @@ -384,7 +387,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 384 | //} | 387 | //} |
| 385 | 388 | ||
| 386 | // Any errors encountered up to this point can cause errors during generation. | 389 | // Any errors encountered up to this point can cause errors during generation. |
| 387 | if (Messaging.Instance.EncounteredError) | 390 | if (this.Messaging.EncounteredError) |
| 388 | { | 391 | { |
| 389 | return; | 392 | return; |
| 390 | } | 393 | } |
| @@ -419,7 +422,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind | |||
| 419 | } | 422 | } |
| 420 | else | 423 | else |
| 421 | { | 424 | { |
| 422 | Messaging.Instance.OnMessage(WixErrors.NoDifferencesInTransform(this.Transform.SourceLineNumbers)); | 425 | this.Messaging.Write(ErrorMessages.NoDifferencesInTransform(this.Transform.SourceLineNumbers)); |
| 423 | } | 426 | } |
| 424 | } | 427 | } |
| 425 | } | 428 | } |
