Class CommandsHandlerProvider
A service that deals with resolving Handler instance to run command in.
Namespace: TehGM.Wolfringo.Commands.Initialization
Assembly: Wolfringo.Commands.dll
Syntax
public class CommandsHandlerProvider : ICommandsHandlerProvider, IDisposable
Remarks
This provider will keep persistent handlers in its own cache, and reuse them when applicable.
The persistent handler instances that implement IDisposable will be automatically disposed when Dispose() method is called.
Constructors
| Improve this Doc View SourceCommandsHandlerProvider()
Creates a new provider instance.
Declaration
public CommandsHandlerProvider()
Methods
| Improve this Doc View SourceDispose()
Disposes the provider.
Declaration
public void Dispose()
Remarks
Any persistent handler that implements IDisposable will also be disposed.
GetCommandHandler(ICommandInstanceDescriptor, IServiceProvider)
Resolves a command handler instance.
Declaration
public ICommandsHandlerProviderResult GetCommandHandler(ICommandInstanceDescriptor descriptor, IServiceProvider services)
Parameters
Type | Name | Description |
---|---|---|
ICommandInstanceDescriptor | descriptor | Descriptor of the command instance. |
IServiceProvider | services | Services that can be used for creaton of handlers. |
Returns
Type | Description |
---|---|
ICommandsHandlerProviderResult | A result of the command handler initialization. |