Add xmldoc
Rob Mensching committed
Jun 6, 2020 at 13:24 UTC
59e358df2f15d478e5bd9f48e3e0824d8a59d7f4
3 files changed
+55
-9
src/WixToolset.Extensibility/Services/IExtensionManager.cs
+11
-8
@@ -5,6 +5,9 @@ namespace WixToolset.Extensibility.Services
5
using System.Collections.Generic;
6
using System.Reflection;
7
8
+ /// <summary>
9
+ /// Loads extensions and uses the extensions' factories to provide services.
10
+ /// </summary>
11
public interface IExtensionManager
12
{
13
/// <summary>
@@ -14,20 +17,20 @@ namespace WixToolset.Extensibility.Services
17
void Add(Assembly extensionAssembly);
18
19
/// <summary>
17
- /// Loads an extension assembly from a type description string.
20
+ /// Loads an extension assembly from an extension reference string.
21
/// </summary>
19
- /// <param name="extension">The assembly type description string.</param>
22
+ /// <param name="extensionReference">Reference to the extension.</param>
23
/// <returns>The loaded assembly. This assembly can be ignored since the extension manager maintains the list of loaded assemblies internally.</returns>
24
/// <remarks>
22
- /// <paramref name="extension"/> can be in several different forms:
25
+ /// <paramref name="extensionReference"/> can be in several different forms:
26
/// <list type="number">
24
- /// <item><term>AssemblyName (MyAssembly, Version=1.3.0.0, Culture=neutral, PublicKeyToken=b17a5c561934e089)</term></item>
25
- /// <item><term>Absolute path to an assembly (C:\MyExtensions\ExtensionAssembly.dll)</term></item>
26
- /// <item><term>Filename of an assembly in the application directory (ExtensionAssembly.dll)</term></item>
27
- /// <item><term>Relative path to an assembly (..\..\MyExtensions\ExtensionAssembly.dll)</term></item>
27
+ /// <item><term>Full path to an extension file (C:\MyExtensions\MyExtension.Example.wixext.dll)</term></item>
28
+ /// <item><term>Reference to latest version of an extension in the cache (MyExtension.Example.wixext)</term></item>
29
+ /// <item><term>Versioned reference to specific extension in the cache (MyExtension.Example.wixext/1.0.2)</term></item>
30
+ /// <item><term>Relative path to an extension file (..\..\MyExtensions\MyExtension.Example.wixext.dll)</term></item>
31
/// </list>
32
/// </remarks>
30
- void Load(string extensionPath);
33
+ void Load(string extensionReference);
34
35
/// <summary>
36
/// Gets extensions of specified type from factories loaded into the extension manager.
src/WixToolset.Extensibility/Services/IWixToolsetServiceProvider.cs
+22
-1
@@ -4,10 +4,31 @@ namespace WixToolset.Extensibility.Services
4
{
5
using System;
6
7
+ /// <summary>
8
+ /// Service provider.
9
+ /// </summary>
10
public interface IWixToolsetServiceProvider : IServiceProvider
11
{
12
+ /// <summary>
13
+ /// Gets a service from the service provider.
14
+ /// </summary>
15
+ /// <typeparam name="T">Type of service to get.</typeparam>
16
+ T GetService<T>() where T : class;
17
+
18
+ /// <summary>
19
+ /// Gets a service from the service provider.
20
+ /// </summary>
21
+ /// <param name="serviceType">Type of service to get.</param>
22
+ /// <param name="service">Retrieved service.</param>
23
+ /// <returns>True if the service was found, otherwise false</returns>
24
bool TryGetService(Type serviceType, out object service);
25
+
26
+ /// <summary>
27
+ /// Gets a service from the service provider.
28
+ /// </summary>
29
+ /// <typeparam name="T">Type of service to get.</typeparam>
30
+ /// <param name="service">Retrieved service.</param>
31
+ /// <returns>True if the service was found, otherwise false</returns>
32
bool TryGetService<T>(out T service) where T : class;
11
- T GetService<T>() where T : class;
33
}
34
}
src/WixToolset.Extensibility/Services/IWixtoolsetCoreServiceProvider.cs
+22
@@ -5,9 +5,31 @@ namespace WixToolset.Extensibility.Services
5
using System;
6
using System.Collections.Generic;
7
8
+ /// <summary>
9
+ /// The core of the service provider used to add services to the service provider.
10
+ /// </summary>
11
public interface IWixToolsetCoreServiceProvider : IWixToolsetServiceProvider
12
{
13
+ /// <summary>
14
+ /// Adds a service to the service locator.
15
+ /// </summary>
16
+ /// <param name="serviceType">Type of the service to add.</param>
17
+ /// <param name="creationFunction">
18
+ /// A function that creates the service. The create function is provided the service provider
19
+ /// itself to resolve additional services and a type dictionary that stores singleton services
20
+ /// the creation function can add its service to.
21
+ /// </param>
22
void AddService(Type serviceType, Func<IWixToolsetCoreServiceProvider, Dictionary<Type, object>, object> creationFunction);
23
+
24
+ /// <summary>
25
+ /// Adds a service to the service locator.
26
+ /// </summary>
27
+ /// <param name="serviceType">Type of the service to add.</param>
28
+ /// <param name="creationFunction">
29
+ /// A function that creates the service. The create function is provided the service provider
30
+ /// itself to resolve additional services and a type dictionary that stores singleton services
31
+ /// the creation function can add its service to.
32
+ /// </param>
33
void AddService<T>(Func<IWixToolsetCoreServiceProvider, Dictionary<Type, object>, T> creationFunction) where T : class;
34
}
35
}