Wolfringo Wolfringo
Wolfringo Wolfringo
Wolfringo (c) 2020 TehGM
DocFX, DiscordFX theme.
Search Results for

    Class CommandsHandlerProvider

    A service that deals with resolving Handler instance to run command in.

    Inheritance
    System.Object
    CommandsHandlerProvider
    Implements
    ICommandsHandlerProvider
    System.IDisposable
    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 System.IDisposable will be automatically disposed when Dispose() method is called.

    Constructors

    | Improve this Doc View Source

    CommandsHandlerProvider()

    Creates a new provider instance.

    Declaration
    public CommandsHandlerProvider()

    Methods

    | Improve this Doc View Source

    Dispose()

    Disposes the provider.

    Declaration
    public void Dispose()
    Remarks

    Any persistent handler that implements System.IDisposable will also be disposed.

    | Improve this Doc View Source

    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.

    System.IServiceProvider services

    Services that can be used for creaton of handlers.

    Returns
    Type Description
    ICommandsHandlerProviderResult

    A result of the command handler initialization.

    Implements

    ICommandsHandlerProvider
    System.IDisposable