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

    Class CommandsServiceBuilder

    A builder for CommandsService.

    Inheritance
    System.Object
    CommandsServiceBuilder
    Namespace: TehGM.Wolfringo.Commands
    Assembly: Wolfringo.Commands.dll
    Syntax
    public class CommandsServiceBuilder

    Constructors

    | Improve this Doc View Source

    CommandsServiceBuilder()

    Creates a new WolfClient builder with default values pre-set.

    Declaration
    public CommandsServiceBuilder()
    | Improve this Doc View Source

    CommandsServiceBuilder(IServiceCollection)

    Creates a new CommandsService builder with provided services.

    Declaration
    public CommandsServiceBuilder(IServiceCollection services)
    Parameters
    Type Name Description
    Microsoft.Extensions.DependencyInjection.IServiceCollection services

    Initial services to use.

    Properties

    | Improve this Doc View Source

    Options

    Options for the client.

    Declaration
    public CommandsOptions Options { get; set; }
    Property Value
    Type Description
    CommandsOptions

    Methods

    | Improve this Doc View Source

    Build()

    Builds a new CommandsService with provided values.

    Declaration
    public CommandsService Build()
    Returns
    Type Description
    CommandsService

    A new CommandsService instance.

    | Improve this Doc View Source

    Build(out IWolfClient, out IServiceProvider)

    Builds a new CommandsService with provided values.

    Declaration
    public CommandsService Build(out IWolfClient client, out IServiceProvider services)
    Parameters
    Type Name Description
    IWolfClient client

    The WOLF Client that is used by the built CommandsService.

    System.IServiceProvider services

    The built service provider.

    Returns
    Type Description
    CommandsService

    A new CommandsService instance.

    | Improve this Doc View Source

    ConfigureOptions(Action<CommandsOptions>)

    Allows configuring options for commands service.

    Declaration
    public CommandsServiceBuilder ConfigureOptions(Action<CommandsOptions> configure)
    Parameters
    Type Name Description
    System.Action<CommandsOptions> configure

    Delegate that can be used for options configuration.

    Returns
    Type Description
    CommandsServiceBuilder

    Current builder instance.

    | Improve this Doc View Source

    WithArgumentsConverterProvider(IArgumentConverterProvider)

    Sets argument converter provider.

    Declaration
    public CommandsServiceBuilder WithArgumentsConverterProvider(IArgumentConverterProvider provider)
    Parameters
    Type Name Description
    IArgumentConverterProvider provider

    The argument converter provider.

    Returns
    Type Description
    CommandsServiceBuilder

    Current builder instance.

    | Improve this Doc View Source

    WithArgumentsConverterProvider<TImplementation>()

    Sets argument converter provider.

    Declaration
    public CommandsServiceBuilder WithArgumentsConverterProvider<TImplementation>()
        where TImplementation : class, IArgumentConverterProvider
    Returns
    Type Description
    CommandsServiceBuilder

    Current builder instance.

    Type Parameters
    Name Description
    TImplementation

    Implementation type of argument converter provider.

    | Improve this Doc View Source

    WithArgumentsParser(IArgumentsParser)

    Sets arguments parser.

    Declaration
    public CommandsServiceBuilder WithArgumentsParser(IArgumentsParser parser)
    Parameters
    Type Name Description
    IArgumentsParser parser

    The arguments parser.

    Returns
    Type Description
    CommandsServiceBuilder

    Current builder instance.

    | Improve this Doc View Source

    WithArgumentsParser<TImplementation>()

    Sets arguments parser.

    Declaration
    public CommandsServiceBuilder WithArgumentsParser<TImplementation>()
        where TImplementation : class, IArgumentsParser
    Returns
    Type Description
    CommandsServiceBuilder

    Current builder instance.

    Type Parameters
    Name Description
    TImplementation

    Implementation type of the arguments parser.

    | Improve this Doc View Source

    WithCancellationToken(CancellationToken)

    Sets cancellation token that can be used for cancelling all tasks within CommandsService.

    Declaration
    public CommandsServiceBuilder WithCancellationToken(CancellationToken cancellationToken)
    Parameters
    Type Name Description
    System.Threading.CancellationToken cancellationToken

    Cancellation token to use.

    Returns
    Type Description
    CommandsServiceBuilder

    Current builder instance.

    | Improve this Doc View Source

    WithCaseSensitivity(Boolean)

    Sets whether commands are case-sensitive by default.

    Declaration
    public CommandsServiceBuilder WithCaseSensitivity(bool caseSensitive)
    Parameters
    Type Name Description
    System.Boolean caseSensitive

    Case sensitivity setting.

    Returns
    Type Description
    CommandsServiceBuilder

    Current builder instance.

    | Improve this Doc View Source

    WithCommandInitializerProvider(ICommandInitializerProvider)

    Sets command initializer provider.

    Declaration
    public CommandsServiceBuilder WithCommandInitializerProvider(ICommandInitializerProvider provider)
    Parameters
    Type Name Description
    ICommandInitializerProvider provider

    The command initializer provider.

    Returns
    Type Description
    CommandsServiceBuilder

    Current builder instance.

    | Improve this Doc View Source

    WithCommandInitializerProvider<TImplementation>()

    Sets command initializer provider.

    Declaration
    public CommandsServiceBuilder WithCommandInitializerProvider<TImplementation>()
        where TImplementation : class, ICommandInitializerProvider
    Returns
    Type Description
    CommandsServiceBuilder

    Current builder instance.

    Type Parameters
    Name Description
    TImplementation

    Implementation type of the command initializer provider.

    | Improve this Doc View Source

    WithCommandsHandlerProvider(ICommandsHandlerProvider)

    Sets commands handler provider.

    Declaration
    public CommandsServiceBuilder WithCommandsHandlerProvider(ICommandsHandlerProvider provider)
    Parameters
    Type Name Description
    ICommandsHandlerProvider provider

    The commands handler provider.

    Returns
    Type Description
    CommandsServiceBuilder

    Current builder instance.

    | Improve this Doc View Source

    WithCommandsHandlerProvider<TImplementation>()

    Sets commands handler provider.

    Declaration
    public CommandsServiceBuilder WithCommandsHandlerProvider<TImplementation>()
        where TImplementation : class, ICommandsHandlerProvider
    Returns
    Type Description
    CommandsServiceBuilder

    Current builder instance.

    Type Parameters
    Name Description
    TImplementation

    Implementation type of commands handler provider.

    | Improve this Doc View Source

    WithCommandsLoader(ICommandsLoader)

    Sets commands loader.

    Declaration
    public CommandsServiceBuilder WithCommandsLoader(ICommandsLoader loader)
    Parameters
    Type Name Description
    ICommandsLoader loader

    The commands loader.

    Returns
    Type Description
    CommandsServiceBuilder

    Current builder instance.

    | Improve this Doc View Source

    WithCommandsLoader<TImplementation>()

    Sets commands loader.

    Declaration
    public CommandsServiceBuilder WithCommandsLoader<TImplementation>()
        where TImplementation : class, ICommandsLoader
    Returns
    Type Description
    CommandsServiceBuilder

    Current builder instance.

    Type Parameters
    Name Description
    TImplementation

    Implementation type of the commands loader.

    | Improve this Doc View Source

    WithDefaultArgumentsConverterProvider()

    Switches to default argument converter provider with default options.

    Declaration
    public CommandsServiceBuilder WithDefaultArgumentsConverterProvider()
    Returns
    Type Description
    CommandsServiceBuilder

    Current builder instance.

    | Improve this Doc View Source

    WithDefaultArgumentsConverterProvider(ArgumentConverterProviderOptions)

    Switches to default argument converter provider.

    Declaration
    public CommandsServiceBuilder WithDefaultArgumentsConverterProvider(ArgumentConverterProviderOptions options)
    Parameters
    Type Name Description
    ArgumentConverterProviderOptions options

    Options for the argument converter provider.

    Returns
    Type Description
    CommandsServiceBuilder

    Current builder instance.

    | Improve this Doc View Source

    WithDefaultArgumentsParser()

    Switches to default arguments parser with default options.

    Declaration
    public CommandsServiceBuilder WithDefaultArgumentsParser()
    Returns
    Type Description
    CommandsServiceBuilder

    Current builder instance.

    | Improve this Doc View Source

    WithDefaultArgumentsParser(ArgumentsParserOptions)

    Switches to default arguments parser.

    Declaration
    public CommandsServiceBuilder WithDefaultArgumentsParser(ArgumentsParserOptions options)
    Parameters
    Type Name Description
    ArgumentsParserOptions options

    Options for the default parser.

    Returns
    Type Description
    CommandsServiceBuilder

    Current builder instance.

    | Improve this Doc View Source

    WithDefaultCommandInitializerProvider()

    Switches to default command initializer provider with default options.

    Declaration
    public CommandsServiceBuilder WithDefaultCommandInitializerProvider()
    Returns
    Type Description
    CommandsServiceBuilder

    Current builder instance.

    | Improve this Doc View Source

    WithDefaultCommandInitializerProvider(CommandInitializerProviderOptions)

    Switches to default command initializer provider.

    Declaration
    public CommandsServiceBuilder WithDefaultCommandInitializerProvider(CommandInitializerProviderOptions options)
    Parameters
    Type Name Description
    CommandInitializerProviderOptions options

    Options for the command initializer provider.

    Returns
    Type Description
    CommandsServiceBuilder

    Current builder instance.

    | Improve this Doc View Source

    WithDefaultCommandsHandlerProvider()

    Switches to default commands handler provider.

    Declaration
    public CommandsServiceBuilder WithDefaultCommandsHandlerProvider()
    Returns
    Type Description
    CommandsServiceBuilder

    Current builder instance.

    | Improve this Doc View Source

    WithDefaultCommandsLoader()

    Switches to default commands loader.

    Declaration
    public CommandsServiceBuilder WithDefaultCommandsLoader()
    Returns
    Type Description
    CommandsServiceBuilder

    Current builder instance.

    | Improve this Doc View Source

    WithDefaultHelpCommand()

    Enables default help command functionality.

    Declaration
    public CommandsServiceBuilder WithDefaultHelpCommand()
    Returns
    Type Description
    CommandsServiceBuilder

    Current builder instance.

    | Improve this Doc View Source

    WithDefaultHelpCommand(Boolean)

    Enables or disables default help command functionality.

    Declaration
    public CommandsServiceBuilder WithDefaultHelpCommand(bool enabled)
    Parameters
    Type Name Description
    System.Boolean enabled

    Whether the default help command should be enabled.

    Returns
    Type Description
    CommandsServiceBuilder

    Current builder instance.

    | Improve this Doc View Source

    WithDefaultParameterBuilder()

    Switches to default parameter builder.

    Declaration
    public CommandsServiceBuilder WithDefaultParameterBuilder()
    Returns
    Type Description
    CommandsServiceBuilder

    Current builder instance.

    | Improve this Doc View Source

    WithLogging(ILogger)

    Sets a logger to be used by the CommandsService.

    Declaration
    public CommandsServiceBuilder WithLogging(ILogger logger)
    Parameters
    Type Name Description
    Microsoft.Extensions.Logging.ILogger logger

    Logger to use.

    Returns
    Type Description
    CommandsServiceBuilder

    Current builder instance.

    | Improve this Doc View Source

    WithLogging(ILoggerFactory)

    Sets a logger factory that will be used to create a logger.

    Declaration
    public CommandsServiceBuilder WithLogging(ILoggerFactory factory)
    Parameters
    Type Name Description
    Microsoft.Extensions.Logging.ILoggerFactory factory

    Logger factory to use when creating a logger.

    Returns
    Type Description
    CommandsServiceBuilder

    Current builder instance.

    | Improve this Doc View Source

    WithParameterBuilder(IParameterBuilder)

    Sets parameter builder.

    Declaration
    public CommandsServiceBuilder WithParameterBuilder(IParameterBuilder builder)
    Parameters
    Type Name Description
    IParameterBuilder builder

    The parameter builder.

    Returns
    Type Description
    CommandsServiceBuilder

    Current builder instance.

    | Improve this Doc View Source

    WithParameterBuilder<TImplementation>()

    Sets parameter builder.

    Declaration
    public CommandsServiceBuilder WithParameterBuilder<TImplementation>()
        where TImplementation : class, IParameterBuilder
    Returns
    Type Description
    CommandsServiceBuilder

    Current builder instance.

    Type Parameters
    Name Description
    TImplementation

    Implementation type of the parameter builder.

    | Improve this Doc View Source

    WithPrefix(String)

    Sets the default prefix for commands.

    Declaration
    public CommandsServiceBuilder WithPrefix(string prefix)
    Parameters
    Type Name Description
    System.String prefix

    Prefix value.

    Returns
    Type Description
    CommandsServiceBuilder

    Current builder instance.

    | Improve this Doc View Source

    WithPrefixRequirement(PrefixRequirement)

    Sets default prefix requirement for commands.

    Declaration
    public CommandsServiceBuilder WithPrefixRequirement(PrefixRequirement requirePrefix)
    Parameters
    Type Name Description
    PrefixRequirement requirePrefix

    Prefix requirement.

    Returns
    Type Description
    CommandsServiceBuilder

    Current builder instance.

    | Improve this Doc View Source

    WithScopedService<TService>(Func<IServiceProvider, TService>)

    Adds any custom service so it can be resolved during Dependency Injection.

    Declaration
    public CommandsServiceBuilder WithScopedService<TService>(Func<IServiceProvider, TService> factory)
        where TService : class
    Parameters
    Type Name Description
    System.Func<System.IServiceProvider, TService> factory

    Delegate that will be invoked when the service is resolved.

    Returns
    Type Description
    CommandsServiceBuilder

    Current builder instance.

    Type Parameters
    Name Description
    TService

    Type of the service.

    | Improve this Doc View Source

    WithScopedService<TService, TImplementation>()

    Adds any custom service so it can be resolved during Dependency Injection.

    Declaration
    public CommandsServiceBuilder WithScopedService<TService, TImplementation>()
        where TService : class where TImplementation : class, TService
    Returns
    Type Description
    CommandsServiceBuilder

    Current builder instance.

    Type Parameters
    Name Description
    TService

    Type of the service.

    TImplementation

    Implementation type of the service

    | Improve this Doc View Source

    WithSingletonService<TService>(TService)

    Adds any custom service so it can be resolved during Dependency Injection.

    Declaration
    public CommandsServiceBuilder WithSingletonService<TService>(TService service)
        where TService : class
    Parameters
    Type Name Description
    TService service

    The service instance.

    Returns
    Type Description
    CommandsServiceBuilder

    Current builder instance.

    Type Parameters
    Name Description
    TService

    Type of the service.

    | Improve this Doc View Source

    WithSingletonService<TService>(Func<IServiceProvider, TService>)

    Adds any custom service so it can be resolved during Dependency Injection.

    Declaration
    public CommandsServiceBuilder WithSingletonService<TService>(Func<IServiceProvider, TService> factory)
        where TService : class
    Parameters
    Type Name Description
    System.Func<System.IServiceProvider, TService> factory

    Delegate that will be invoked when the service is resolved.

    Returns
    Type Description
    CommandsServiceBuilder

    Current builder instance.

    Type Parameters
    Name Description
    TService

    Type of the service.

    | Improve this Doc View Source

    WithSingletonService<TService, TImplementation>()

    Adds any custom service so it can be resolved during Dependency Injection.

    Declaration
    public CommandsServiceBuilder WithSingletonService<TService, TImplementation>()
        where TService : class where TImplementation : class, TService
    Returns
    Type Description
    CommandsServiceBuilder

    Current builder instance.

    Type Parameters
    Name Description
    TService

    Type of the service.

    TImplementation

    Implementation type of the service

    | Improve this Doc View Source

    WithTransientService<TService>(Func<IServiceProvider, TService>)

    Adds any custom service so it can be resolved during Dependency Injection.

    Declaration
    public CommandsServiceBuilder WithTransientService<TService>(Func<IServiceProvider, TService> factory)
        where TService : class
    Parameters
    Type Name Description
    System.Func<System.IServiceProvider, TService> factory

    Delegate that will be invoked when the service is resolved.

    Returns
    Type Description
    CommandsServiceBuilder

    Current builder instance.

    Type Parameters
    Name Description
    TService

    Type of the service.

    | Improve this Doc View Source

    WithTransientService<TService, TImplementation>()

    Adds any custom service so it can be resolved during Dependency Injection.

    Declaration
    public CommandsServiceBuilder WithTransientService<TService, TImplementation>()
        where TService : class where TImplementation : class, TService
    Returns
    Type Description
    CommandsServiceBuilder

    Current builder instance.

    Type Parameters
    Name Description
    TService

    Type of the service.

    TImplementation

    Implementation type of the service

    | Improve this Doc View Source

    WithWolfClient(Action<WolfClientBuilder>)

    Sets WOLF client to use with the CommandsService.

    Declaration
    public CommandsServiceBuilder WithWolfClient(Action<WolfClientBuilder> clientBuilder)
    Parameters
    Type Name Description
    System.Action<WolfClientBuilder> clientBuilder

    A delegate that allows configuring the WolfClient before creation.

    Returns
    Type Description
    CommandsServiceBuilder

    Current builder instance.

    Remarks

    This method allows you configure the client using WolfClientBuilder.

    | Improve this Doc View Source

    WithWolfClient(IWolfClient)

    Sets WOLF client to use with the CommandsService.

    Declaration
    public CommandsServiceBuilder WithWolfClient(IWolfClient client)
    Parameters
    Type Name Description
    IWolfClient client

    The WOLF client.

    Returns
    Type Description
    CommandsServiceBuilder

    Current builder instance.

    | Improve this Doc View Source

    WithWolfClient<TImplementation>()

    Sets WOLF client to use with the CommandsService.

    Declaration
    public CommandsServiceBuilder WithWolfClient<TImplementation>()
        where TImplementation : class, IWolfClient
    Returns
    Type Description
    CommandsServiceBuilder

    Current builder instance.

    Type Parameters
    Name Description
    TImplementation

    Implementation type of the WOLF client.

    Events

    | Improve this Doc View Source

    Building

    Invoked when the builder is about to build a new instance of CommandsService.

    Declaration
    public event Action<IServiceCollection> Building
    Event Type
    Type Description
    System.Action<Microsoft.Extensions.DependencyInjection.IServiceCollection>
    | Improve this Doc View Source

    Built

    Invoked when the builder has finished building a new instance of CommandsService.

    Declaration
    public event Action<CommandsService, IServiceProvider> Built
    Event Type
    Type Description
    System.Action<CommandsService, System.IServiceProvider>