Interface ICommandsLoader
A service that loads Command instance descriptors from types and assemblies.
Namespace: TehGM.Wolfringo.Commands.Initialization
Assembly: Wolfringo.Commands.dll
Syntax
public interface ICommandsLoader
Methods
| Improve this Doc View SourceLoadFromAssemblyAsync(Assembly, CancellationToken)
Loads all command instance descriptors from an assembly.
Declaration
Task<IEnumerable<ICommandInstanceDescriptor>> LoadFromAssemblyAsync(Assembly assembly, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | Assembly to load descriptors from. |
System.Threading.CancellationToken | cancellationToken | Token that can be used to stop loading. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<ICommandInstanceDescriptor>> | Enumerable of all loaded command descriptors. |
LoadFromMethodAsync(MethodInfo, CancellationToken)
Loads all command instance descriptors from a method.
Declaration
Task<IEnumerable<ICommandInstanceDescriptor>> LoadFromMethodAsync(MethodInfo method, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MethodInfo | method | Method to load descriptors from. |
System.Threading.CancellationToken | cancellationToken | Token that can be used to stop loading. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<ICommandInstanceDescriptor>> | Enumerable of all loaded command descriptors. |
LoadFromTypeAsync(TypeInfo, CancellationToken)
Loads all command instance descriptors from a type.
Declaration
Task<IEnumerable<ICommandInstanceDescriptor>> LoadFromTypeAsync(TypeInfo type, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.TypeInfo | type | Type to load descriptors from. |
System.Threading.CancellationToken | cancellationToken | Token that can be used to stop loading. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<ICommandInstanceDescriptor>> | Enumerable of all loaded command descriptors. |