From 59e358df2f15d478e5bd9f48e3e0824d8a59d7f4 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Sat, 6 Jun 2020 13:24:14 -0700 Subject: Add xmldoc --- .../Services/IExtensionManager.cs | 19 ++++++++++-------- .../Services/IWixToolsetServiceProvider.cs | 23 +++++++++++++++++++++- .../Services/IWixtoolsetCoreServiceProvider.cs | 22 +++++++++++++++++++++ 3 files changed, 55 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/WixToolset.Extensibility/Services/IExtensionManager.cs b/src/WixToolset.Extensibility/Services/IExtensionManager.cs index 19b41e4f..a8087941 100644 --- a/src/WixToolset.Extensibility/Services/IExtensionManager.cs +++ b/src/WixToolset.Extensibility/Services/IExtensionManager.cs @@ -5,6 +5,9 @@ namespace WixToolset.Extensibility.Services using System.Collections.Generic; using System.Reflection; + /// + /// Loads extensions and uses the extensions' factories to provide services. + /// public interface IExtensionManager { /// @@ -14,20 +17,20 @@ namespace WixToolset.Extensibility.Services void Add(Assembly extensionAssembly); /// - /// Loads an extension assembly from a type description string. + /// Loads an extension assembly from an extension reference string. /// - /// The assembly type description string. + /// Reference to the extension. /// The loaded assembly. This assembly can be ignored since the extension manager maintains the list of loaded assemblies internally. /// - /// can be in several different forms: + /// can be in several different forms: /// - /// AssemblyName (MyAssembly, Version=1.3.0.0, Culture=neutral, PublicKeyToken=b17a5c561934e089) - /// Absolute path to an assembly (C:\MyExtensions\ExtensionAssembly.dll) - /// Filename of an assembly in the application directory (ExtensionAssembly.dll) - /// Relative path to an assembly (..\..\MyExtensions\ExtensionAssembly.dll) + /// Full path to an extension file (C:\MyExtensions\MyExtension.Example.wixext.dll) + /// Reference to latest version of an extension in the cache (MyExtension.Example.wixext) + /// Versioned reference to specific extension in the cache (MyExtension.Example.wixext/1.0.2) + /// Relative path to an extension file (..\..\MyExtensions\MyExtension.Example.wixext.dll) /// /// - void Load(string extensionPath); + void Load(string extensionReference); /// /// Gets extensions of specified type from factories loaded into the extension manager. diff --git a/src/WixToolset.Extensibility/Services/IWixToolsetServiceProvider.cs b/src/WixToolset.Extensibility/Services/IWixToolsetServiceProvider.cs index c9ef36e1..0315f7ed 100644 --- a/src/WixToolset.Extensibility/Services/IWixToolsetServiceProvider.cs +++ b/src/WixToolset.Extensibility/Services/IWixToolsetServiceProvider.cs @@ -4,10 +4,31 @@ namespace WixToolset.Extensibility.Services { using System; + /// + /// Service provider. + /// public interface IWixToolsetServiceProvider : IServiceProvider { + /// + /// Gets a service from the service provider. + /// + /// Type of service to get. + T GetService() where T : class; + + /// + /// Gets a service from the service provider. + /// + /// Type of service to get. + /// Retrieved service. + /// True if the service was found, otherwise false bool TryGetService(Type serviceType, out object service); + + /// + /// Gets a service from the service provider. + /// + /// Type of service to get. + /// Retrieved service. + /// True if the service was found, otherwise false bool TryGetService(out T service) where T : class; - T GetService() where T : class; } } diff --git a/src/WixToolset.Extensibility/Services/IWixtoolsetCoreServiceProvider.cs b/src/WixToolset.Extensibility/Services/IWixtoolsetCoreServiceProvider.cs index cda725f7..3c80ddef 100644 --- a/src/WixToolset.Extensibility/Services/IWixtoolsetCoreServiceProvider.cs +++ b/src/WixToolset.Extensibility/Services/IWixtoolsetCoreServiceProvider.cs @@ -5,9 +5,31 @@ namespace WixToolset.Extensibility.Services using System; using System.Collections.Generic; + /// + /// The core of the service provider used to add services to the service provider. + /// public interface IWixToolsetCoreServiceProvider : IWixToolsetServiceProvider { + /// + /// Adds a service to the service locator. + /// + /// Type of the service to add. + /// + /// A function that creates the service. The create function is provided the service provider + /// itself to resolve additional services and a type dictionary that stores singleton services + /// the creation function can add its service to. + /// void AddService(Type serviceType, Func, object> creationFunction); + + /// + /// Adds a service to the service locator. + /// + /// Type of the service to add. + /// + /// A function that creates the service. The create function is provided the service provider + /// itself to resolve additional services and a type dictionary that stores singleton services + /// the creation function can add its service to. + /// void AddService(Func, T> creationFunction) where T : class; } } -- cgit v1.2.3-55-g6feb