diff options
author | Rob Mensching <rob@firegiant.com> | 2019-05-12 15:56:22 -0700 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2019-05-12 23:25:04 -0700 |
commit | 83b04241472fdc93b0a3a7511479a1182ad5f4c0 (patch) | |
tree | 21f6d7e389201cf1a6b334b7496075d8e6108b48 /src | |
parent | 1a45fef205dcaa3d310faba5ea6a10828c3b62cf (diff) | |
download | wix-83b04241472fdc93b0a3a7511479a1182ad5f4c0.tar.gz wix-83b04241472fdc93b0a3a7511479a1182ad5f4c0.tar.bz2 wix-83b04241472fdc93b0a3a7511479a1182ad5f4c0.zip |
IExtensionManager.Create renamed to IExtensionManager.GetServices
Diffstat (limited to 'src')
12 files changed, 23 insertions, 23 deletions
diff --git a/src/WixToolset.Core.Burn/Bind/BindBundleCommand.cs b/src/WixToolset.Core.Burn/Bind/BindBundleCommand.cs index 5dfe935f..61aa5189 100644 --- a/src/WixToolset.Core.Burn/Bind/BindBundleCommand.cs +++ b/src/WixToolset.Core.Burn/Bind/BindBundleCommand.cs | |||
@@ -76,7 +76,7 @@ namespace WixToolset.Core.Burn | |||
76 | 76 | ||
77 | var extensionManager = context.ServiceProvider.GetService<IExtensionManager>(); | 77 | var extensionManager = context.ServiceProvider.GetService<IExtensionManager>(); |
78 | 78 | ||
79 | this.BackendExtensions = extensionManager.Create<IBurnBackendExtension>(); | 79 | this.BackendExtensions = extensionManager.GetServices<IBurnBackendExtension>(); |
80 | } | 80 | } |
81 | 81 | ||
82 | public CompressionLevel DefaultCompressionLevel { private get; set; } | 82 | public CompressionLevel DefaultCompressionLevel { private get; set; } |
diff --git a/src/WixToolset.Core.WindowsInstaller/MsiBackend.cs b/src/WixToolset.Core.WindowsInstaller/MsiBackend.cs index f105473b..2ebb3f13 100644 --- a/src/WixToolset.Core.WindowsInstaller/MsiBackend.cs +++ b/src/WixToolset.Core.WindowsInstaller/MsiBackend.cs | |||
@@ -17,7 +17,7 @@ namespace WixToolset.Core.WindowsInstaller | |||
17 | { | 17 | { |
18 | var extensionManager = context.ServiceProvider.GetService<IExtensionManager>(); | 18 | var extensionManager = context.ServiceProvider.GetService<IExtensionManager>(); |
19 | 19 | ||
20 | var backendExtensions = extensionManager.Create<IWindowsInstallerBackendBinderExtension>(); | 20 | var backendExtensions = extensionManager.GetServices<IWindowsInstallerBackendBinderExtension>(); |
21 | 21 | ||
22 | foreach (var extension in backendExtensions) | 22 | foreach (var extension in backendExtensions) |
23 | { | 23 | { |
@@ -44,7 +44,7 @@ namespace WixToolset.Core.WindowsInstaller | |||
44 | { | 44 | { |
45 | var extensionManager = context.ServiceProvider.GetService<IExtensionManager>(); | 45 | var extensionManager = context.ServiceProvider.GetService<IExtensionManager>(); |
46 | 46 | ||
47 | var backendExtensions = extensionManager.Create<IWindowsInstallerBackendDecompilerExtension>(); | 47 | var backendExtensions = extensionManager.GetServices<IWindowsInstallerBackendDecompilerExtension>(); |
48 | 48 | ||
49 | foreach (var extension in backendExtensions) | 49 | foreach (var extension in backendExtensions) |
50 | { | 50 | { |
diff --git a/src/WixToolset.Core.WindowsInstaller/MsmBackend.cs b/src/WixToolset.Core.WindowsInstaller/MsmBackend.cs index d17aad8e..d5281759 100644 --- a/src/WixToolset.Core.WindowsInstaller/MsmBackend.cs +++ b/src/WixToolset.Core.WindowsInstaller/MsmBackend.cs | |||
@@ -16,7 +16,7 @@ namespace WixToolset.Core.WindowsInstaller | |||
16 | { | 16 | { |
17 | var extensionManager = context.ServiceProvider.GetService<IExtensionManager>(); | 17 | var extensionManager = context.ServiceProvider.GetService<IExtensionManager>(); |
18 | 18 | ||
19 | var backendExtensions = extensionManager.Create<IWindowsInstallerBackendBinderExtension>(); | 19 | var backendExtensions = extensionManager.GetServices<IWindowsInstallerBackendBinderExtension>(); |
20 | 20 | ||
21 | foreach (var extension in backendExtensions) | 21 | foreach (var extension in backendExtensions) |
22 | { | 22 | { |
@@ -49,7 +49,7 @@ namespace WixToolset.Core.WindowsInstaller | |||
49 | { | 49 | { |
50 | var extensionManager = context.ServiceProvider.GetService<IExtensionManager>(); | 50 | var extensionManager = context.ServiceProvider.GetService<IExtensionManager>(); |
51 | 51 | ||
52 | var backendExtensions = extensionManager.Create<IWindowsInstallerBackendDecompilerExtension>(); | 52 | var backendExtensions = extensionManager.GetServices<IWindowsInstallerBackendDecompilerExtension>(); |
53 | 53 | ||
54 | foreach (var extension in backendExtensions) | 54 | foreach (var extension in backendExtensions) |
55 | { | 55 | { |
diff --git a/src/WixToolset.Core/Binder.cs b/src/WixToolset.Core/Binder.cs index 73ad7c04..29fad7f0 100644 --- a/src/WixToolset.Core/Binder.cs +++ b/src/WixToolset.Core/Binder.cs | |||
@@ -56,7 +56,7 @@ namespace WixToolset.Core | |||
56 | { | 56 | { |
57 | var extensionManager = context.ServiceProvider.GetService<IExtensionManager>(); | 57 | var extensionManager = context.ServiceProvider.GetService<IExtensionManager>(); |
58 | 58 | ||
59 | var backendFactories = extensionManager.Create<IBackendFactory>(); | 59 | var backendFactories = extensionManager.GetServices<IBackendFactory>(); |
60 | 60 | ||
61 | var entrySection = context.IntermediateRepresentation.Sections[0]; | 61 | var entrySection = context.IntermediateRepresentation.Sections[0]; |
62 | 62 | ||
diff --git a/src/WixToolset.Core/CommandLine/BuildCommand.cs b/src/WixToolset.Core/CommandLine/BuildCommand.cs index 7e6ddd64..bfee2478 100644 --- a/src/WixToolset.Core/CommandLine/BuildCommand.cs +++ b/src/WixToolset.Core/CommandLine/BuildCommand.cs | |||
@@ -187,7 +187,7 @@ namespace WixToolset.Core.CommandLine | |||
187 | } | 187 | } |
188 | 188 | ||
189 | var context = this.ServiceProvider.GetService<ICompileContext>(); | 189 | var context = this.ServiceProvider.GetService<ICompileContext>(); |
190 | context.Extensions = this.ExtensionManager.Create<ICompilerExtension>(); | 190 | context.Extensions = this.ExtensionManager.GetServices<ICompilerExtension>(); |
191 | context.OutputPath = sourceFile.OutputPath; | 191 | context.OutputPath = sourceFile.OutputPath; |
192 | context.Platform = this.Platform; | 192 | context.Platform = this.Platform; |
193 | context.Source = document; | 193 | context.Source = document; |
@@ -219,7 +219,7 @@ namespace WixToolset.Core.CommandLine | |||
219 | var context = this.ServiceProvider.GetService<ILibraryContext>(); | 219 | var context = this.ServiceProvider.GetService<ILibraryContext>(); |
220 | context.BindFiles = bindFiles; | 220 | context.BindFiles = bindFiles; |
221 | context.BindPaths = bindPaths; | 221 | context.BindPaths = bindPaths; |
222 | context.Extensions = this.ExtensionManager.Create<ILibrarianExtension>(); | 222 | context.Extensions = this.ExtensionManager.GetServices<ILibrarianExtension>(); |
223 | context.Localizations = localizations; | 223 | context.Localizations = localizations; |
224 | context.Intermediates = intermediates; | 224 | context.Intermediates = intermediates; |
225 | 225 | ||
@@ -247,8 +247,8 @@ namespace WixToolset.Core.CommandLine | |||
247 | } | 247 | } |
248 | 248 | ||
249 | var context = this.ServiceProvider.GetService<ILinkContext>(); | 249 | var context = this.ServiceProvider.GetService<ILinkContext>(); |
250 | context.Extensions = this.ExtensionManager.Create<ILinkerExtension>(); | 250 | context.Extensions = this.ExtensionManager.GetServices<ILinkerExtension>(); |
251 | context.ExtensionData = this.ExtensionManager.Create<IExtensionData>(); | 251 | context.ExtensionData = this.ExtensionManager.GetServices<IExtensionData>(); |
252 | context.ExpectedOutputType = this.OutputType; | 252 | context.ExpectedOutputType = this.OutputType; |
253 | context.Intermediates = intermediates.Concat(libraries).ToList(); | 253 | context.Intermediates = intermediates.Concat(libraries).ToList(); |
254 | context.TupleDefinitionCreator = creator; | 254 | context.TupleDefinitionCreator = creator; |
@@ -269,8 +269,8 @@ namespace WixToolset.Core.CommandLine | |||
269 | { | 269 | { |
270 | var context = this.ServiceProvider.GetService<IResolveContext>(); | 270 | var context = this.ServiceProvider.GetService<IResolveContext>(); |
271 | context.BindPaths = bindPaths; | 271 | context.BindPaths = bindPaths; |
272 | context.Extensions = this.ExtensionManager.Create<IResolverExtension>(); | 272 | context.Extensions = this.ExtensionManager.GetServices<IResolverExtension>(); |
273 | context.ExtensionData = this.ExtensionManager.Create<IExtensionData>(); | 273 | context.ExtensionData = this.ExtensionManager.GetServices<IExtensionData>(); |
274 | context.FilterCultures = filterCultures; | 274 | context.FilterCultures = filterCultures; |
275 | context.IntermediateFolder = intermediateFolder; | 275 | context.IntermediateFolder = intermediateFolder; |
276 | context.IntermediateRepresentation = output; | 276 | context.IntermediateRepresentation = output; |
@@ -295,7 +295,7 @@ namespace WixToolset.Core.CommandLine | |||
295 | //context.DefaultCompressionLevel = this.DefaultCompressionLevel; | 295 | //context.DefaultCompressionLevel = this.DefaultCompressionLevel; |
296 | context.DelayedFields = resolveResult.DelayedFields; | 296 | context.DelayedFields = resolveResult.DelayedFields; |
297 | context.ExpectedEmbeddedFiles = resolveResult.ExpectedEmbeddedFiles; | 297 | context.ExpectedEmbeddedFiles = resolveResult.ExpectedEmbeddedFiles; |
298 | context.Extensions = this.ExtensionManager.Create<IBinderExtension>(); | 298 | context.Extensions = this.ExtensionManager.GetServices<IBinderExtension>(); |
299 | context.Ices = Array.Empty<string>(); // TODO: set this correctly | 299 | context.Ices = Array.Empty<string>(); // TODO: set this correctly |
300 | context.IntermediateFolder = intermediateFolder; | 300 | context.IntermediateFolder = intermediateFolder; |
301 | context.IntermediateRepresentation = resolveResult.IntermediateRepresentation; | 301 | context.IntermediateRepresentation = resolveResult.IntermediateRepresentation; |
@@ -315,7 +315,7 @@ namespace WixToolset.Core.CommandLine | |||
315 | 315 | ||
316 | { | 316 | { |
317 | var context = this.ServiceProvider.GetService<ILayoutContext>(); | 317 | var context = this.ServiceProvider.GetService<ILayoutContext>(); |
318 | context.Extensions = this.ExtensionManager.Create<ILayoutExtension>(); | 318 | context.Extensions = this.ExtensionManager.GetServices<ILayoutExtension>(); |
319 | context.TrackedFiles = bindResult.TrackedFiles; | 319 | context.TrackedFiles = bindResult.TrackedFiles; |
320 | context.FileTransfers = bindResult.FileTransfers; | 320 | context.FileTransfers = bindResult.FileTransfers; |
321 | context.IntermediateFolder = intermediateFolder; | 321 | context.IntermediateFolder = intermediateFolder; |
@@ -371,7 +371,7 @@ namespace WixToolset.Core.CommandLine | |||
371 | private XDocument Preprocess(IDictionary<string, string> preprocessorVariables, string sourcePath) | 371 | private XDocument Preprocess(IDictionary<string, string> preprocessorVariables, string sourcePath) |
372 | { | 372 | { |
373 | var context = this.ServiceProvider.GetService<IPreprocessContext>(); | 373 | var context = this.ServiceProvider.GetService<IPreprocessContext>(); |
374 | context.Extensions = this.ExtensionManager.Create<IPreprocessorExtension>(); | 374 | context.Extensions = this.ExtensionManager.GetServices<IPreprocessorExtension>(); |
375 | context.Platform = this.Platform; | 375 | context.Platform = this.Platform; |
376 | context.IncludeSearchPaths = this.IncludeSearchPaths; | 376 | context.IncludeSearchPaths = this.IncludeSearchPaths; |
377 | context.SourcePath = sourcePath; | 377 | context.SourcePath = sourcePath; |
diff --git a/src/WixToolset.Core/CommandLine/CommandLine.cs b/src/WixToolset.Core/CommandLine/CommandLine.cs index 9aefc50a..8e359e14 100644 --- a/src/WixToolset.Core/CommandLine/CommandLine.cs +++ b/src/WixToolset.Core/CommandLine/CommandLine.cs | |||
@@ -89,7 +89,7 @@ namespace WixToolset.Core.CommandLine | |||
89 | 89 | ||
90 | private ICommandLineCommand Parse(ICommandLineContext context) | 90 | private ICommandLineCommand Parse(ICommandLineContext context) |
91 | { | 91 | { |
92 | var extensions = this.ExtensionManager.Create<IExtensionCommandLine>(); | 92 | var extensions = this.ExtensionManager.GetServices<IExtensionCommandLine>(); |
93 | 93 | ||
94 | foreach (var extension in extensions) | 94 | foreach (var extension in extensions) |
95 | { | 95 | { |
diff --git a/src/WixToolset.Core/CommandLine/CompileCommand.cs b/src/WixToolset.Core/CommandLine/CompileCommand.cs index bc37ee8c..0a354a8f 100644 --- a/src/WixToolset.Core/CommandLine/CompileCommand.cs +++ b/src/WixToolset.Core/CommandLine/CompileCommand.cs | |||
@@ -57,7 +57,7 @@ namespace WixToolset.Core.CommandLine | |||
57 | foreach (var sourceFile in this.SourceFiles) | 57 | foreach (var sourceFile in this.SourceFiles) |
58 | { | 58 | { |
59 | var context = this.ServiceProvider.GetService<IPreprocessContext>(); | 59 | var context = this.ServiceProvider.GetService<IPreprocessContext>(); |
60 | context.Extensions = this.ExtensionManager.Create<IPreprocessorExtension>(); | 60 | context.Extensions = this.ExtensionManager.GetServices<IPreprocessorExtension>(); |
61 | context.Platform = this.Platform; | 61 | context.Platform = this.Platform; |
62 | context.IncludeSearchPaths = this.IncludeSearchPaths; | 62 | context.IncludeSearchPaths = this.IncludeSearchPaths; |
63 | context.SourcePath = sourceFile.SourcePath; | 63 | context.SourcePath = sourceFile.SourcePath; |
@@ -80,7 +80,7 @@ namespace WixToolset.Core.CommandLine | |||
80 | } | 80 | } |
81 | 81 | ||
82 | var compileContext = this.ServiceProvider.GetService<ICompileContext>(); | 82 | var compileContext = this.ServiceProvider.GetService<ICompileContext>(); |
83 | compileContext.Extensions = this.ExtensionManager.Create<ICompilerExtension>(); | 83 | compileContext.Extensions = this.ExtensionManager.GetServices<ICompilerExtension>(); |
84 | compileContext.OutputPath = sourceFile.OutputPath; | 84 | compileContext.OutputPath = sourceFile.OutputPath; |
85 | compileContext.Platform = this.Platform; | 85 | compileContext.Platform = this.Platform; |
86 | compileContext.Source = result?.Document; | 86 | compileContext.Source = result?.Document; |
diff --git a/src/WixToolset.Core/CommandLine/DecompileCommand.cs b/src/WixToolset.Core/CommandLine/DecompileCommand.cs index 3aa750c8..fbba3d9f 100644 --- a/src/WixToolset.Core/CommandLine/DecompileCommand.cs +++ b/src/WixToolset.Core/CommandLine/DecompileCommand.cs | |||
@@ -38,7 +38,7 @@ namespace WixToolset.Core.CommandLine | |||
38 | } | 38 | } |
39 | 39 | ||
40 | var context = this.ServiceProvider.GetService<IDecompileContext>(); | 40 | var context = this.ServiceProvider.GetService<IDecompileContext>(); |
41 | context.Extensions = this.ServiceProvider.GetService<IExtensionManager>().Create<IDecompilerExtension>(); | 41 | context.Extensions = this.ServiceProvider.GetService<IExtensionManager>().GetServices<IDecompilerExtension>(); |
42 | context.DecompilePath = this.commandLine.DecompileFilePath; | 42 | context.DecompilePath = this.commandLine.DecompileFilePath; |
43 | context.DecompileType = this.commandLine.CalculateDecompileType(); | 43 | context.DecompileType = this.commandLine.CalculateDecompileType(); |
44 | context.IntermediateFolder = this.commandLine.CalculateIntermedateFolder(); | 44 | context.IntermediateFolder = this.commandLine.CalculateIntermedateFolder(); |
diff --git a/src/WixToolset.Core/Decompiler.cs b/src/WixToolset.Core/Decompiler.cs index c0ca200b..859f582b 100644 --- a/src/WixToolset.Core/Decompiler.cs +++ b/src/WixToolset.Core/Decompiler.cs | |||
@@ -49,7 +49,7 @@ namespace WixToolset.Core | |||
49 | { | 49 | { |
50 | var extensionManager = context.ServiceProvider.GetService<IExtensionManager>(); | 50 | var extensionManager = context.ServiceProvider.GetService<IExtensionManager>(); |
51 | 51 | ||
52 | var backendFactories = extensionManager.Create<IBackendFactory>(); | 52 | var backendFactories = extensionManager.GetServices<IBackendFactory>(); |
53 | 53 | ||
54 | foreach (var factory in backendFactories) | 54 | foreach (var factory in backendFactories) |
55 | { | 55 | { |
diff --git a/src/WixToolset.Core/ExtensibilityServices/ExtensionManager.cs b/src/WixToolset.Core/ExtensibilityServices/ExtensionManager.cs index d1bbbb4a..d80f25a2 100644 --- a/src/WixToolset.Core/ExtensibilityServices/ExtensionManager.cs +++ b/src/WixToolset.Core/ExtensibilityServices/ExtensionManager.cs | |||
@@ -84,7 +84,7 @@ namespace WixToolset.Core.ExtensibilityServices | |||
84 | } | 84 | } |
85 | } | 85 | } |
86 | 86 | ||
87 | public IEnumerable<T> Create<T>() where T : class | 87 | public IEnumerable<T> GetServices<T>() where T : class |
88 | { | 88 | { |
89 | if (!this.loadedExtensionsByType.TryGetValue(typeof(T), out var extensions)) | 89 | if (!this.loadedExtensionsByType.TryGetValue(typeof(T), out var extensions)) |
90 | { | 90 | { |
diff --git a/src/WixToolset.Core/ExtensibilityServices/PreprocessHelper.cs b/src/WixToolset.Core/ExtensibilityServices/PreprocessHelper.cs index f95b4110..dfee0046 100644 --- a/src/WixToolset.Core/ExtensibilityServices/PreprocessHelper.cs +++ b/src/WixToolset.Core/ExtensibilityServices/PreprocessHelper.cs | |||
@@ -465,7 +465,7 @@ namespace WixToolset.Core.ExtensibilityServices | |||
465 | 465 | ||
466 | var extensionManager = this.ServiceProvider.GetService<IExtensionManager>(); | 466 | var extensionManager = this.ServiceProvider.GetService<IExtensionManager>(); |
467 | 467 | ||
468 | var extensions = extensionManager.Create<IPreprocessorExtension>(); | 468 | var extensions = extensionManager.GetServices<IPreprocessorExtension>(); |
469 | 469 | ||
470 | foreach (var extension in extensions) | 470 | foreach (var extension in extensions) |
471 | { | 471 | { |
diff --git a/src/WixToolset.Core/ExtensibilityServices/TupleDefinitionCreator.cs b/src/WixToolset.Core/ExtensibilityServices/TupleDefinitionCreator.cs index e223e3a4..aeeeebe7 100644 --- a/src/WixToolset.Core/ExtensibilityServices/TupleDefinitionCreator.cs +++ b/src/WixToolset.Core/ExtensibilityServices/TupleDefinitionCreator.cs | |||
@@ -64,7 +64,7 @@ namespace WixToolset.Core.ExtensibilityServices | |||
64 | { | 64 | { |
65 | var extensionManager = (IExtensionManager)this.ServiceProvider.GetService(typeof(IExtensionManager)); | 65 | var extensionManager = (IExtensionManager)this.ServiceProvider.GetService(typeof(IExtensionManager)); |
66 | 66 | ||
67 | this.ExtensionData = extensionManager.Create<IExtensionData>(); | 67 | this.ExtensionData = extensionManager.GetServices<IExtensionData>(); |
68 | } | 68 | } |
69 | } | 69 | } |
70 | } | 70 | } |