From 83b04241472fdc93b0a3a7511479a1182ad5f4c0 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Sun, 12 May 2019 15:56:22 -0700 Subject: IExtensionManager.Create renamed to IExtensionManager.GetServices --- src/WixToolset.Core.Burn/Bind/BindBundleCommand.cs | 2 +- src/WixToolset.Core.WindowsInstaller/MsiBackend.cs | 4 ++-- src/WixToolset.Core.WindowsInstaller/MsmBackend.cs | 4 ++-- src/WixToolset.Core/Binder.cs | 2 +- src/WixToolset.Core/CommandLine/BuildCommand.cs | 18 +++++++++--------- src/WixToolset.Core/CommandLine/CommandLine.cs | 2 +- src/WixToolset.Core/CommandLine/CompileCommand.cs | 4 ++-- src/WixToolset.Core/CommandLine/DecompileCommand.cs | 2 +- src/WixToolset.Core/Decompiler.cs | 2 +- .../ExtensibilityServices/ExtensionManager.cs | 2 +- .../ExtensibilityServices/PreprocessHelper.cs | 2 +- .../ExtensibilityServices/TupleDefinitionCreator.cs | 2 +- 12 files changed, 23 insertions(+), 23 deletions(-) (limited to 'src') 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 var extensionManager = context.ServiceProvider.GetService(); - this.BackendExtensions = extensionManager.Create(); + this.BackendExtensions = extensionManager.GetServices(); } 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 { var extensionManager = context.ServiceProvider.GetService(); - var backendExtensions = extensionManager.Create(); + var backendExtensions = extensionManager.GetServices(); foreach (var extension in backendExtensions) { @@ -44,7 +44,7 @@ namespace WixToolset.Core.WindowsInstaller { var extensionManager = context.ServiceProvider.GetService(); - var backendExtensions = extensionManager.Create(); + var backendExtensions = extensionManager.GetServices(); foreach (var extension in backendExtensions) { 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 { var extensionManager = context.ServiceProvider.GetService(); - var backendExtensions = extensionManager.Create(); + var backendExtensions = extensionManager.GetServices(); foreach (var extension in backendExtensions) { @@ -49,7 +49,7 @@ namespace WixToolset.Core.WindowsInstaller { var extensionManager = context.ServiceProvider.GetService(); - var backendExtensions = extensionManager.Create(); + var backendExtensions = extensionManager.GetServices(); foreach (var extension in backendExtensions) { 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 { var extensionManager = context.ServiceProvider.GetService(); - var backendFactories = extensionManager.Create(); + var backendFactories = extensionManager.GetServices(); var entrySection = context.IntermediateRepresentation.Sections[0]; 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 } var context = this.ServiceProvider.GetService(); - context.Extensions = this.ExtensionManager.Create(); + context.Extensions = this.ExtensionManager.GetServices(); context.OutputPath = sourceFile.OutputPath; context.Platform = this.Platform; context.Source = document; @@ -219,7 +219,7 @@ namespace WixToolset.Core.CommandLine var context = this.ServiceProvider.GetService(); context.BindFiles = bindFiles; context.BindPaths = bindPaths; - context.Extensions = this.ExtensionManager.Create(); + context.Extensions = this.ExtensionManager.GetServices(); context.Localizations = localizations; context.Intermediates = intermediates; @@ -247,8 +247,8 @@ namespace WixToolset.Core.CommandLine } var context = this.ServiceProvider.GetService(); - context.Extensions = this.ExtensionManager.Create(); - context.ExtensionData = this.ExtensionManager.Create(); + context.Extensions = this.ExtensionManager.GetServices(); + context.ExtensionData = this.ExtensionManager.GetServices(); context.ExpectedOutputType = this.OutputType; context.Intermediates = intermediates.Concat(libraries).ToList(); context.TupleDefinitionCreator = creator; @@ -269,8 +269,8 @@ namespace WixToolset.Core.CommandLine { var context = this.ServiceProvider.GetService(); context.BindPaths = bindPaths; - context.Extensions = this.ExtensionManager.Create(); - context.ExtensionData = this.ExtensionManager.Create(); + context.Extensions = this.ExtensionManager.GetServices(); + context.ExtensionData = this.ExtensionManager.GetServices(); context.FilterCultures = filterCultures; context.IntermediateFolder = intermediateFolder; context.IntermediateRepresentation = output; @@ -295,7 +295,7 @@ namespace WixToolset.Core.CommandLine //context.DefaultCompressionLevel = this.DefaultCompressionLevel; context.DelayedFields = resolveResult.DelayedFields; context.ExpectedEmbeddedFiles = resolveResult.ExpectedEmbeddedFiles; - context.Extensions = this.ExtensionManager.Create(); + context.Extensions = this.ExtensionManager.GetServices(); context.Ices = Array.Empty(); // TODO: set this correctly context.IntermediateFolder = intermediateFolder; context.IntermediateRepresentation = resolveResult.IntermediateRepresentation; @@ -315,7 +315,7 @@ namespace WixToolset.Core.CommandLine { var context = this.ServiceProvider.GetService(); - context.Extensions = this.ExtensionManager.Create(); + context.Extensions = this.ExtensionManager.GetServices(); context.TrackedFiles = bindResult.TrackedFiles; context.FileTransfers = bindResult.FileTransfers; context.IntermediateFolder = intermediateFolder; @@ -371,7 +371,7 @@ namespace WixToolset.Core.CommandLine private XDocument Preprocess(IDictionary preprocessorVariables, string sourcePath) { var context = this.ServiceProvider.GetService(); - context.Extensions = this.ExtensionManager.Create(); + context.Extensions = this.ExtensionManager.GetServices(); context.Platform = this.Platform; context.IncludeSearchPaths = this.IncludeSearchPaths; 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 private ICommandLineCommand Parse(ICommandLineContext context) { - var extensions = this.ExtensionManager.Create(); + var extensions = this.ExtensionManager.GetServices(); foreach (var extension in extensions) { 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 foreach (var sourceFile in this.SourceFiles) { var context = this.ServiceProvider.GetService(); - context.Extensions = this.ExtensionManager.Create(); + context.Extensions = this.ExtensionManager.GetServices(); context.Platform = this.Platform; context.IncludeSearchPaths = this.IncludeSearchPaths; context.SourcePath = sourceFile.SourcePath; @@ -80,7 +80,7 @@ namespace WixToolset.Core.CommandLine } var compileContext = this.ServiceProvider.GetService(); - compileContext.Extensions = this.ExtensionManager.Create(); + compileContext.Extensions = this.ExtensionManager.GetServices(); compileContext.OutputPath = sourceFile.OutputPath; compileContext.Platform = this.Platform; 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 } var context = this.ServiceProvider.GetService(); - context.Extensions = this.ServiceProvider.GetService().Create(); + context.Extensions = this.ServiceProvider.GetService().GetServices(); context.DecompilePath = this.commandLine.DecompileFilePath; context.DecompileType = this.commandLine.CalculateDecompileType(); 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 { var extensionManager = context.ServiceProvider.GetService(); - var backendFactories = extensionManager.Create(); + var backendFactories = extensionManager.GetServices(); foreach (var factory in backendFactories) { 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 } } - public IEnumerable Create() where T : class + public IEnumerable GetServices() where T : class { if (!this.loadedExtensionsByType.TryGetValue(typeof(T), out var extensions)) { 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 var extensionManager = this.ServiceProvider.GetService(); - var extensions = extensionManager.Create(); + var extensions = extensionManager.GetServices(); foreach (var extension in extensions) { 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 { var extensionManager = (IExtensionManager)this.ServiceProvider.GetService(typeof(IExtensionManager)); - this.ExtensionData = extensionManager.Create(); + this.ExtensionData = extensionManager.GetServices(); } } } -- cgit v1.2.3-55-g6feb