diff options
Diffstat (limited to 'src/WixToolset.Core.Burn/Bundles/ProcessExePackageCommand.cs')
-rw-r--r-- | src/WixToolset.Core.Burn/Bundles/ProcessExePackageCommand.cs | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/WixToolset.Core.Burn/Bundles/ProcessExePackageCommand.cs b/src/WixToolset.Core.Burn/Bundles/ProcessExePackageCommand.cs new file mode 100644 index 00000000..11512c39 --- /dev/null +++ b/src/WixToolset.Core.Burn/Bundles/ProcessExePackageCommand.cs | |||
@@ -0,0 +1,33 @@ | |||
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.Core.Burn.Bundles | ||
4 | { | ||
5 | using System; | ||
6 | using WixToolset.Data; | ||
7 | using WixToolset.Data.Rows; | ||
8 | |||
9 | /// <summary> | ||
10 | /// Initializes package state from the Exe contents. | ||
11 | /// </summary> | ||
12 | internal class ProcessExePackageCommand | ||
13 | { | ||
14 | public RowDictionary<WixBundlePayloadRow> AuthoredPayloads { private get; set; } | ||
15 | |||
16 | public PackageFacade Facade { private get; set; } | ||
17 | |||
18 | /// <summary> | ||
19 | /// Processes the Exe packages to add properties and payloads from the Exe packages. | ||
20 | /// </summary> | ||
21 | public void Execute() | ||
22 | { | ||
23 | WixBundlePayloadRow packagePayload = this.AuthoredPayloads.Get(this.Facade.Package.PackagePayload); | ||
24 | |||
25 | if (String.IsNullOrEmpty(this.Facade.Package.CacheId)) | ||
26 | { | ||
27 | this.Facade.Package.CacheId = packagePayload.Hash; | ||
28 | } | ||
29 | |||
30 | this.Facade.Package.Version = packagePayload.Version; | ||
31 | } | ||
32 | } | ||
33 | } | ||