diff options
author | Rob Mensching <rob@firegiant.com> | 2018-07-23 14:21:40 -0700 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2018-07-23 14:27:11 -0700 |
commit | 5a1afc9030a1fcc101b6bb52b576fbbfa3ad33c2 (patch) | |
tree | d409a2399bd831f16ecdb8e68947ea672dcd65d4 /src/WixToolset.Core/Librarian.cs | |
parent | 2724cfee4c163f3297ee25edfd2372767cfd4945 (diff) | |
download | wix-5a1afc9030a1fcc101b6bb52b576fbbfa3ad33c2.tar.gz wix-5a1afc9030a1fcc101b6bb52b576fbbfa3ad33c2.tar.bz2 wix-5a1afc9030a1fcc101b6bb52b576fbbfa3ad33c2.zip |
Integrate Extensibility.Data namespace change from Extensibility repo
Diffstat (limited to 'src/WixToolset.Core/Librarian.cs')
-rw-r--r-- | src/WixToolset.Core/Librarian.cs | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/WixToolset.Core/Librarian.cs b/src/WixToolset.Core/Librarian.cs index c42356ac..15efcfcc 100644 --- a/src/WixToolset.Core/Librarian.cs +++ b/src/WixToolset.Core/Librarian.cs | |||
@@ -9,6 +9,7 @@ namespace WixToolset.Core | |||
9 | using WixToolset.Core.Link; | 9 | using WixToolset.Core.Link; |
10 | using WixToolset.Data; | 10 | using WixToolset.Data; |
11 | using WixToolset.Extensibility; | 11 | using WixToolset.Extensibility; |
12 | using WixToolset.Extensibility.Data; | ||
12 | using WixToolset.Extensibility.Services; | 13 | using WixToolset.Extensibility.Services; |
13 | 14 | ||
14 | /// <summary> | 15 | /// <summary> |
@@ -19,10 +20,14 @@ namespace WixToolset.Core | |||
19 | public Librarian(IServiceProvider serviceProvider) | 20 | public Librarian(IServiceProvider serviceProvider) |
20 | { | 21 | { |
21 | this.ServiceProvider = serviceProvider; | 22 | this.ServiceProvider = serviceProvider; |
23 | |||
24 | this.Messaging = this.ServiceProvider.GetService<IMessaging>(); | ||
22 | } | 25 | } |
23 | 26 | ||
24 | private IServiceProvider ServiceProvider { get; } | 27 | private IServiceProvider ServiceProvider { get; } |
25 | 28 | ||
29 | private IMessaging Messaging { get; } | ||
30 | |||
26 | private ILibraryContext Context { get; set; } | 31 | private ILibraryContext Context { get; set; } |
27 | 32 | ||
28 | public bool BindFiles { get; set; } | 33 | public bool BindFiles { get; set; } |
@@ -41,7 +46,6 @@ namespace WixToolset.Core | |||
41 | public Intermediate Execute() | 46 | public Intermediate Execute() |
42 | { | 47 | { |
43 | this.Context = new LibraryContext(this.ServiceProvider); | 48 | this.Context = new LibraryContext(this.ServiceProvider); |
44 | this.Context.Messaging = this.ServiceProvider.GetService<IMessaging>(); | ||
45 | this.Context.BindFiles = this.BindFiles; | 49 | this.Context.BindFiles = this.BindFiles; |
46 | this.Context.BindPaths = this.BindPaths; | 50 | this.Context.BindPaths = this.BindPaths; |
47 | this.Context.Extensions = this.ServiceProvider.GetService<IExtensionManager>().Create<ILibrarianExtension>(); | 51 | this.Context.Extensions = this.ServiceProvider.GetService<IExtensionManager>().Create<ILibrarianExtension>(); |
@@ -59,10 +63,10 @@ namespace WixToolset.Core | |||
59 | { | 63 | { |
60 | var sections = this.Context.Intermediates.SelectMany(i => i.Sections).ToList(); | 64 | var sections = this.Context.Intermediates.SelectMany(i => i.Sections).ToList(); |
61 | 65 | ||
62 | var collate = new CollateLocalizationsCommand(this.Context.Messaging, this.Context.Localizations); | 66 | var collate = new CollateLocalizationsCommand(this.Messaging, this.Context.Localizations); |
63 | var localizationsByCulture = collate.Execute(); | 67 | var localizationsByCulture = collate.Execute(); |
64 | 68 | ||
65 | if (this.Context.Messaging.EncounteredError) | 69 | if (this.Messaging.EncounteredError) |
66 | { | 70 | { |
67 | return null; | 71 | return null; |
68 | } | 72 | } |
@@ -86,7 +90,7 @@ namespace WixToolset.Core | |||
86 | } | 90 | } |
87 | } | 91 | } |
88 | 92 | ||
89 | return this.Context.Messaging.EncounteredError ? null : library; | 93 | return this.Messaging.EncounteredError ? null : library; |
90 | } | 94 | } |
91 | 95 | ||
92 | /// <summary> | 96 | /// <summary> |
@@ -95,7 +99,7 @@ namespace WixToolset.Core | |||
95 | /// <param name="library">Library to validate.</param> | 99 | /// <param name="library">Library to validate.</param> |
96 | private void Validate(Intermediate library) | 100 | private void Validate(Intermediate library) |
97 | { | 101 | { |
98 | FindEntrySectionAndLoadSymbolsCommand find = new FindEntrySectionAndLoadSymbolsCommand(this.Context.Messaging, library.Sections); | 102 | FindEntrySectionAndLoadSymbolsCommand find = new FindEntrySectionAndLoadSymbolsCommand(this.Messaging, library.Sections); |
99 | find.Execute(); | 103 | find.Execute(); |
100 | 104 | ||
101 | // TODO: Consider bringing this sort of verification back. | 105 | // TODO: Consider bringing this sort of verification back. |
@@ -116,7 +120,7 @@ namespace WixToolset.Core | |||
116 | // Resolve paths to files that are to be embedded in the library. | 120 | // Resolve paths to files that are to be embedded in the library. |
117 | if (this.Context.BindFiles) | 121 | if (this.Context.BindFiles) |
118 | { | 122 | { |
119 | var variableResolver = new WixVariableResolver(this.Context.Messaging); | 123 | var variableResolver = new WixVariableResolver(this.Messaging); |
120 | 124 | ||
121 | var fileResolver = new FileResolver(this.Context.BindPaths, this.Context.Extensions); | 125 | var fileResolver = new FileResolver(this.Context.BindPaths, this.Context.Extensions); |
122 | 126 | ||
@@ -141,7 +145,7 @@ namespace WixToolset.Core | |||
141 | } | 145 | } |
142 | else | 146 | else |
143 | { | 147 | { |
144 | this.Context.Messaging.Write(ErrorMessages.FileNotFound(tuple.SourceLineNumbers, pathField.Path, tuple.Definition.Name)); | 148 | this.Messaging.Write(ErrorMessages.FileNotFound(tuple.SourceLineNumbers, pathField.Path, tuple.Definition.Name)); |
145 | } | 149 | } |
146 | } | 150 | } |
147 | } | 151 | } |