diff --git a/src/testcentric.extensibility.api/IExtensionManager.cs b/src/testcentric.extensibility.api/IExtensionManager.cs index b9fa895..8649b61 100644 --- a/src/testcentric.extensibility.api/IExtensionManager.cs +++ b/src/testcentric.extensibility.api/IExtensionManager.cs @@ -55,7 +55,8 @@ public interface IExtensionManager /// Find all ExtensionPoints in a list of assemblies and add them to the ExtensionPoints property. /// /// The assemblies to be examined for ExtensionPoints - void FindExtensionPoints(params Assembly[] assemblies); + /// The current instance of IExtensionManager + IExtensionManager FindExtensionPoints(params Assembly[] assemblies); /// /// Gets an IExtensionPoint given its path @@ -79,7 +80,8 @@ public interface IExtensionManager /// /// Path to the directory containing the initial .addins files used to locate extensions /// - void FindExtensions(string startDir); + /// The current instance of IExtensionManager + IExtensionManager FindExtensions(string startDir); /// /// Enumerates all extension objects matching a given type diff --git a/src/testcentric.extensibility/ExtensionManager.cs b/src/testcentric.extensibility/ExtensionManager.cs index 8d7e446..ed4769d 100644 --- a/src/testcentric.extensibility/ExtensionManager.cs +++ b/src/testcentric.extensibility/ExtensionManager.cs @@ -107,7 +107,7 @@ public IEnumerable ExtensionPoints } /// - public void FindExtensionPoints(params Assembly[] assemblies) + public IExtensionManager FindExtensionPoints(params Assembly[] assemblies) { foreach (var assembly in assemblies) { @@ -138,6 +138,8 @@ public void FindExtensionPoints(params Assembly[] assemblies) } } + return this; + void AddExtensionPoint(string path, Type type, AssemblyName assemblyName, string description = null) { if (_pathIndex.ContainsKey(path)) @@ -178,7 +180,7 @@ public IEnumerable Extensions } /// - public void FindExtensions(string startDir) + public IExtensionManager FindExtensions(string startDir) { // Find potential extension assemblies log.Info("Initializing Extensions..."); @@ -188,6 +190,8 @@ public void FindExtensions(string startDir) // Check each assembly to see if it contains extensions foreach (var candidate in _extensionAssemblies) FindExtensionsInAssembly(candidate); + + return this; } ///