diff options
Diffstat (limited to 'src/WixToolset.Core/ExtensionManager.cs')
-rw-r--r-- | src/WixToolset.Core/ExtensionManager.cs | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/WixToolset.Core/ExtensionManager.cs b/src/WixToolset.Core/ExtensionManager.cs index 7e40571b..b9038c6a 100644 --- a/src/WixToolset.Core/ExtensionManager.cs +++ b/src/WixToolset.Core/ExtensionManager.cs | |||
@@ -1,6 +1,6 @@ | |||
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. | 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 | 2 | ||
3 | namespace WixToolset | 3 | namespace WixToolset.Core |
4 | { | 4 | { |
5 | using System; | 5 | using System; |
6 | using System.Collections.Generic; | 6 | using System.Collections.Generic; |
@@ -8,13 +8,24 @@ namespace WixToolset | |||
8 | using System.Linq; | 8 | using System.Linq; |
9 | using System.Reflection; | 9 | using System.Reflection; |
10 | using WixToolset.Data; | 10 | using WixToolset.Data; |
11 | using WixToolset.Extensibility; | 11 | using WixToolset.Extensibility.Services; |
12 | 12 | ||
13 | public class ExtensionManager : IExtensionManager | 13 | public class ExtensionManager : IExtensionManager |
14 | { | 14 | { |
15 | private List<Assembly> extensionAssemblies = new List<Assembly>(); | 15 | private List<Assembly> extensionAssemblies = new List<Assembly>(); |
16 | 16 | ||
17 | /// <summary> | 17 | /// <summary> |
18 | /// Adds an assembly. | ||
19 | /// </summary> | ||
20 | /// <param name="assembly">Assembly to add to the extension manager.</param> | ||
21 | /// <returns>The assembly added.</returns> | ||
22 | public Assembly Add(Assembly assembly) | ||
23 | { | ||
24 | this.extensionAssemblies.Add(assembly); | ||
25 | return assembly; | ||
26 | } | ||
27 | |||
28 | /// <summary> | ||
18 | /// Loads an assembly from a type description string. | 29 | /// Loads an assembly from a type description string. |
19 | /// </summary> | 30 | /// </summary> |
20 | /// <param name="extension">The assembly type description string.</param> | 31 | /// <param name="extension">The assembly type description string.</param> |
@@ -57,8 +68,7 @@ namespace WixToolset | |||
57 | assembly = ExtensionManager.ExtensionLoadFrom(assemblyName); | 68 | assembly = ExtensionManager.ExtensionLoadFrom(assemblyName); |
58 | } | 69 | } |
59 | 70 | ||
60 | this.extensionAssemblies.Add(assembly); | 71 | return this.Add(assembly); |
61 | return assembly; | ||
62 | } | 72 | } |
63 | 73 | ||
64 | /// <summary> | 74 | /// <summary> |