diff options
Diffstat (limited to 'src/WixToolset.Core/ExtensionManager.cs')
| -rw-r--r-- | src/WixToolset.Core/ExtensionManager.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/WixToolset.Core/ExtensionManager.cs b/src/WixToolset.Core/ExtensionManager.cs index 45cb65ec..7e40571b 100644 --- a/src/WixToolset.Core/ExtensionManager.cs +++ b/src/WixToolset.Core/ExtensionManager.cs | |||
| @@ -8,8 +8,9 @@ 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 | 12 | ||
| 12 | public class ExtensionManager | 13 | public class ExtensionManager : IExtensionManager |
| 13 | { | 14 | { |
| 14 | private List<Assembly> extensionAssemblies = new List<Assembly>(); | 15 | private List<Assembly> extensionAssemblies = new List<Assembly>(); |
| 15 | 16 | ||
| @@ -67,8 +68,7 @@ namespace WixToolset | |||
| 67 | /// <returns>Extensions created of the specified type.</returns> | 68 | /// <returns>Extensions created of the specified type.</returns> |
| 68 | public IEnumerable<T> Create<T>() where T : class | 69 | public IEnumerable<T> Create<T>() where T : class |
| 69 | { | 70 | { |
| 70 | var extensionType = typeof(T); | 71 | var types = this.extensionAssemblies.SelectMany(a => a.GetTypes().Where(t => !t.IsAbstract && !t.IsInterface && typeof(T).IsAssignableFrom(t))); |
| 71 | var types = this.extensionAssemblies.SelectMany(a => a.GetTypes().Where(t => !t.IsAbstract && !t.IsInterface && extensionType.IsAssignableFrom(t))); | ||
| 72 | return types.Select(t => (T)Activator.CreateInstance(t)).ToList(); | 72 | return types.Select(t => (T)Activator.CreateInstance(t)).ToList(); |
| 73 | } | 73 | } |
| 74 | 74 | ||
