diff options
| author | Rob Mensching <rob@firegiant.com> | 2017-11-11 12:41:56 -0800 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2017-11-11 12:41:56 -0800 |
| commit | b6bf1604c32259757f75b4c35444cfe4ecc21a86 (patch) | |
| tree | eb573ffb95d99228dbb40968814ac3eaa01271f7 /src/WixToolset.Core.WindowsInstaller | |
| parent | 9f8cb5374481b6c8a06eb2739858332350f72666 (diff) | |
| download | wix-b6bf1604c32259757f75b4c35444cfe4ecc21a86.tar.gz wix-b6bf1604c32259757f75b4c35444cfe4ecc21a86.tar.bz2 wix-b6bf1604c32259757f75b4c35444cfe4ecc21a86.zip | |
Introduce IExtensionFactory as mechanism to create extensions
Diffstat (limited to 'src/WixToolset.Core.WindowsInstaller')
| -rw-r--r-- | src/WixToolset.Core.WindowsInstaller/WindowsInstallerExtensionFactory.cs | 22 | ||||
| -rw-r--r-- | src/WixToolset.Core.WindowsInstaller/WixToolsetStandardBackend.cs (renamed from src/WixToolset.Core.WindowsInstaller/StandardBackend.cs) | 2 |
2 files changed, 23 insertions, 1 deletions
diff --git a/src/WixToolset.Core.WindowsInstaller/WindowsInstallerExtensionFactory.cs b/src/WixToolset.Core.WindowsInstaller/WindowsInstallerExtensionFactory.cs new file mode 100644 index 00000000..7b12fc8c --- /dev/null +++ b/src/WixToolset.Core.WindowsInstaller/WindowsInstallerExtensionFactory.cs | |||
| @@ -0,0 +1,22 @@ | |||
| 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.WindowsInstaller | ||
| 4 | { | ||
| 5 | using System; | ||
| 6 | using WixToolset.Extensibility; | ||
| 7 | |||
| 8 | internal class WindowsInstallerExtensionFactory : IExtensionFactory | ||
| 9 | { | ||
| 10 | public bool TryCreateExtension(Type extensionType, out object extension) | ||
| 11 | { | ||
| 12 | extension = null; | ||
| 13 | |||
| 14 | if (extensionType == typeof(IBackendFactory)) | ||
| 15 | { | ||
| 16 | extension = new WindowsInstallerBackendFactory(); | ||
| 17 | } | ||
| 18 | |||
| 19 | return extension != null; | ||
| 20 | } | ||
| 21 | } | ||
| 22 | } | ||
diff --git a/src/WixToolset.Core.WindowsInstaller/StandardBackend.cs b/src/WixToolset.Core.WindowsInstaller/WixToolsetStandardBackend.cs index f1ae2017..3751cb54 100644 --- a/src/WixToolset.Core.WindowsInstaller/StandardBackend.cs +++ b/src/WixToolset.Core.WindowsInstaller/WixToolsetStandardBackend.cs | |||
| @@ -6,7 +6,7 @@ namespace WixToolset.Core.WindowsInstaller | |||
| 6 | /// Denotes this assembly contains a backend that is considered | 6 | /// Denotes this assembly contains a backend that is considered |
| 7 | /// a standard part of the WiX Toolset. | 7 | /// a standard part of the WiX Toolset. |
| 8 | /// </summary> | 8 | /// </summary> |
| 9 | public static class StandardBackend | 9 | public static class WixToolsetStandardBackend |
| 10 | { | 10 | { |
| 11 | } | 11 | } |
| 12 | } | 12 | } |
