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 |
---|---|---|
Assembly | assembly | Assembly to load descriptors from. |
CancellationToken | cancellationToken | Token that can be used to stop loading. |
Returns
Type | Description |
---|---|
Task<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 |
---|---|---|
MethodInfo | method | Method to load descriptors from. |
CancellationToken | cancellationToken | Token that can be used to stop loading. |
Returns
Type | Description |
---|---|
Task<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 |
---|---|---|
TypeInfo | type | Type to load descriptors from. |
CancellationToken | cancellationToken | Token that can be used to stop loading. |
Returns
Type | Description |
---|---|
Task<IEnumerable<ICommandInstanceDescriptor>> | Enumerable of all loaded command descriptors. |