diff options
Diffstat (limited to 'src/WixToolset.Core/Layout.cs')
-rw-r--r-- | src/WixToolset.Core/Layout.cs | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/WixToolset.Core/Layout.cs b/src/WixToolset.Core/Layout.cs index d62335fb..a44c212d 100644 --- a/src/WixToolset.Core/Layout.cs +++ b/src/WixToolset.Core/Layout.cs | |||
@@ -8,8 +8,8 @@ namespace WixToolset.Core | |||
8 | using System.Linq; | 8 | using System.Linq; |
9 | using WixToolset.Core.Bind; | 9 | using WixToolset.Core.Bind; |
10 | using WixToolset.Data; | 10 | using WixToolset.Data; |
11 | using WixToolset.Data.Bind; | ||
12 | using WixToolset.Extensibility; | 11 | using WixToolset.Extensibility; |
12 | using WixToolset.Extensibility.Data; | ||
13 | using WixToolset.Extensibility.Services; | 13 | using WixToolset.Extensibility.Services; |
14 | 14 | ||
15 | /// <summary> | 15 | /// <summary> |
@@ -20,10 +20,14 @@ namespace WixToolset.Core | |||
20 | public Layout(IServiceProvider serviceProvider) | 20 | public Layout(IServiceProvider serviceProvider) |
21 | { | 21 | { |
22 | this.ServiceProvider = serviceProvider; | 22 | this.ServiceProvider = serviceProvider; |
23 | |||
24 | this.Messaging = serviceProvider.GetService<IMessaging>(); | ||
23 | } | 25 | } |
24 | 26 | ||
25 | private IServiceProvider ServiceProvider { get; } | 27 | private IServiceProvider ServiceProvider { get; } |
26 | 28 | ||
29 | private IMessaging Messaging { get; } | ||
30 | |||
27 | public IEnumerable<FileTransfer> FileTransfers { get; set; } | 31 | public IEnumerable<FileTransfer> FileTransfers { get; set; } |
28 | 32 | ||
29 | public IEnumerable<string> ContentFilePaths { get; set; } | 33 | public IEnumerable<string> ContentFilePaths { get; set; } |
@@ -36,21 +40,16 @@ namespace WixToolset.Core | |||
36 | 40 | ||
37 | public bool SuppressAclReset { get; set; } | 41 | public bool SuppressAclReset { get; set; } |
38 | 42 | ||
39 | private IMessaging Messaging { get; set; } | ||
40 | |||
41 | public void Execute() | 43 | public void Execute() |
42 | { | 44 | { |
43 | this.Messaging = this.ServiceProvider.GetService<IMessaging>(); | ||
44 | |||
45 | var extensionManager = this.ServiceProvider.GetService<IExtensionManager>(); | 45 | var extensionManager = this.ServiceProvider.GetService<IExtensionManager>(); |
46 | 46 | ||
47 | var context = this.ServiceProvider.GetService<ILayoutContext>(); | 47 | var context = this.ServiceProvider.GetService<ILayoutContext>(); |
48 | context.Messaging = this.Messaging; | ||
49 | context.Extensions = extensionManager.Create<ILayoutExtension>(); | 48 | context.Extensions = extensionManager.Create<ILayoutExtension>(); |
50 | context.FileTransfers = this.FileTransfers; | 49 | context.FileTransfers = this.FileTransfers; |
51 | context.ContentFilePaths = this.ContentFilePaths; | 50 | context.ContentFilePaths = this.ContentFilePaths; |
52 | context.ContentsFile = this.ContentsFile; | 51 | context.ContentsFile = this.ContentsFile; |
53 | context.OutputPdbPath = this.OutputsFile; | 52 | context.OutputsFile = this.OutputsFile; |
54 | context.BuiltOutputsFile = this.BuiltOutputsFile; | 53 | context.BuiltOutputsFile = this.BuiltOutputsFile; |
55 | context.SuppressAclReset = this.SuppressAclReset; | 54 | context.SuppressAclReset = this.SuppressAclReset; |
56 | 55 | ||
@@ -69,7 +68,7 @@ namespace WixToolset.Core | |||
69 | { | 68 | { |
70 | this.Messaging.Write(VerboseMessages.LayingOutMedia()); | 69 | this.Messaging.Write(VerboseMessages.LayingOutMedia()); |
71 | 70 | ||
72 | var command = new TransferFilesCommand(context.Messaging, context.Extensions, context.FileTransfers, context.SuppressAclReset); | 71 | var command = new TransferFilesCommand(this.Messaging, context.Extensions, context.FileTransfers, context.SuppressAclReset); |
73 | command.Execute(); | 72 | command.Execute(); |
74 | } | 73 | } |
75 | } | 74 | } |