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

    Class CommandsServiceCollectionExtensions

    Dependency Injection extensions for HostedCommandsService.

    Inheritance
    System.Object
    CommandsServiceCollectionExtensions
    Namespace: Microsoft.Extensions.DependencyInjection
    Assembly: Wolfringo.Hosting.dll
    Syntax
    public static class CommandsServiceCollectionExtensions

    Methods

    | Improve this Doc View Source

    AddArgumentBlockMarker(IHostedCommandsServiceBuilder, Char, Char)

    Adds argument marker to Arguments Parser.

    Declaration
    public static IHostedCommandsServiceBuilder AddArgumentBlockMarker(this IHostedCommandsServiceBuilder builder, char startMarker, char endMarker)
    Parameters
    Type Name Description
    IHostedCommandsServiceBuilder builder

    Hosted Commands Service builder.

    System.Char startMarker

    Opening marker for argument block.

    System.Char endMarker

    Closing marker for argument block.

    Returns
    Type Description
    IHostedCommandsServiceBuilder
    See Also
    IArgumentsParser
    BlockMarkers
    | Improve this Doc View Source

    AddHandler<T>(IHostedCommandsServiceBuilder)

    Adds handler to Command Service.

    Declaration
    public static IHostedCommandsServiceBuilder AddHandler<T>(this IHostedCommandsServiceBuilder builder)
    Parameters
    Type Name Description
    IHostedCommandsServiceBuilder builder

    Hosted Commands Service builder.

    Returns
    Type Description
    IHostedCommandsServiceBuilder
    Type Parameters
    Name Description
    T

    Type of handler to add.

    See Also
    CommandsHandlerAttribute
    LoadFromTypeAsync(System.Reflection.TypeInfo, System.Threading.CancellationToken)
    Classes
    | Improve this Doc View Source

    AddHandlers(IHostedCommandsServiceBuilder, Assembly[])

    Adds handlers to Command Service.

    Declaration
    public static IHostedCommandsServiceBuilder AddHandlers(this IHostedCommandsServiceBuilder builder, params Assembly[] assemblies)
    Parameters
    Type Name Description
    IHostedCommandsServiceBuilder builder

    Hosted Commands Service builder.

    System.Reflection.Assembly[] assemblies

    Assemblies to load handlers from.

    Returns
    Type Description
    IHostedCommandsServiceBuilder
    See Also
    CommandsHandlerAttribute
    LoadFromAssemblyAsync(System.Reflection.Assembly, System.Threading.CancellationToken)
    Assemblies
    | Improve this Doc View Source

    AddHandlers(IHostedCommandsServiceBuilder, Type[])

    Adds handlers to Command Service.

    Declaration
    public static IHostedCommandsServiceBuilder AddHandlers(this IHostedCommandsServiceBuilder builder, params Type[] handlerTypes)
    Parameters
    Type Name Description
    IHostedCommandsServiceBuilder builder

    Hosted Commands Service builder.

    System.Type[] handlerTypes

    Types of handlers to add.

    Returns
    Type Description
    IHostedCommandsServiceBuilder
    See Also
    CommandsHandlerAttribute
    LoadFromTypeAsync(System.Reflection.TypeInfo, System.Threading.CancellationToken)
    Classes
    | Improve this Doc View Source

    AddWolfringoCommands(IServiceCollection, Action<CommandsOptions>)

    Adds Wolfringo Commands System.

    Declaration
    public static IHostedCommandsServiceBuilder AddWolfringoCommands(this IServiceCollection services, Action<CommandsOptions> configure = null)
    Parameters
    Type Name Description
    Microsoft.Extensions.DependencyInjection.IServiceCollection services

    Service collection.

    System.Action<CommandsOptions> configure

    Alters configuration of Command Service.

    Returns
    Type Description
    IHostedCommandsServiceBuilder
    | Improve this Doc View Source

    EnableDefaultHelpCommand(IHostedCommandsServiceBuilder)

    Enables default help command.

    Declaration
    public static IHostedCommandsServiceBuilder EnableDefaultHelpCommand(this IHostedCommandsServiceBuilder builder)
    Parameters
    Type Name Description
    IHostedCommandsServiceBuilder builder

    Hosted Commands Service builder.

    Returns
    Type Description
    IHostedCommandsServiceBuilder
    | Improve this Doc View Source

    MapArgumentConverter(IHostedCommandsServiceBuilder, Type, IArgumentConverter)

    Maps an argument converter in Argument Converter Provider.

    Declaration
    public static IHostedCommandsServiceBuilder MapArgumentConverter(this IHostedCommandsServiceBuilder builder, Type parameterType, IArgumentConverter converter)
    Parameters
    Type Name Description
    IHostedCommandsServiceBuilder builder

    Hosted Commands Service builder.

    System.Type parameterType

    Type of parameter to set converter for.

    IArgumentConverter converter

    Converter to convert type with.

    Returns
    Type Description
    IHostedCommandsServiceBuilder
    See Also
    IArgumentConverterProvider
    IArgumentConverter
    Converters
    | Improve this Doc View Source

    MapCommandInitializer(IHostedCommandsServiceBuilder, Type, ICommandInitializer)

    Maps command initializer for a command attribute type in Command Initializer Provider.

    Declaration
    public static IHostedCommandsServiceBuilder MapCommandInitializer(this IHostedCommandsServiceBuilder builder, Type commandArgumentType, ICommandInitializer initializer)
    Parameters
    Type Name Description
    IHostedCommandsServiceBuilder builder

    Hosted Commands Service builder.

    System.Type commandArgumentType

    Type of command attribute.

    ICommandInitializer initializer

    Initializer to use for given command attribute type.

    Returns
    Type Description
    IHostedCommandsServiceBuilder
    See Also
    ICommandInitializerProvider
    ICommandInitializer
    CommandAttributeBase
    Initializers
    | Improve this Doc View Source

    RemoveArgumentBlockMarker(IHostedCommandsServiceBuilder, Char)

    Removes argument marker from Arguments Parser.

    Declaration
    public static IHostedCommandsServiceBuilder RemoveArgumentBlockMarker(this IHostedCommandsServiceBuilder builder, char startMarker)
    Parameters
    Type Name Description
    IHostedCommandsServiceBuilder builder

    Hosted Commands Service builder.

    System.Char startMarker

    Opening marker for argument block.

    Returns
    Type Description
    IHostedCommandsServiceBuilder
    See Also
    IArgumentsParser
    BlockMarkers
    | Improve this Doc View Source

    RemoveDefaultHandlers(IHostedCommandsServiceBuilder)

    Removes all default assemblies and classes from Commands Options.

    Declaration
    public static IHostedCommandsServiceBuilder RemoveDefaultHandlers(this IHostedCommandsServiceBuilder builder)
    Parameters
    Type Name Description
    IHostedCommandsServiceBuilder builder

    Hosted Commands Service builder.

    Returns
    Type Description
    IHostedCommandsServiceBuilder
    See Also
    CommandsOptions
    CommandsHandlerAttribute
    ICommandsLoader
    | Improve this Doc View Source

    SetArgumentBaseMarker(IHostedCommandsServiceBuilder, Char)

    Sets base argument marker for Arguments Parser.

    Declaration
    public static IHostedCommandsServiceBuilder SetArgumentBaseMarker(this IHostedCommandsServiceBuilder builder, char marker)
    Parameters
    Type Name Description
    IHostedCommandsServiceBuilder builder

    Hosted Commands Service builder.

    System.Char marker

    Marker for to use as base.

    Returns
    Type Description
    IHostedCommandsServiceBuilder
    See Also
    IArgumentsParser
    BaseMarker
    | Improve this Doc View Source

    SetCaseSensitive(IHostedCommandsServiceBuilder, Boolean)

    Sets case sensitivity.

    Declaration
    public static IHostedCommandsServiceBuilder SetCaseSensitive(this IHostedCommandsServiceBuilder builder, bool caseSensitive)
    Parameters
    Type Name Description
    IHostedCommandsServiceBuilder builder

    Hosted Commands Service builder.

    System.Boolean caseSensitive

    Whether commands should be case sensitive.

    Returns
    Type Description
    IHostedCommandsServiceBuilder
    See Also
    CaseSensitivity
    | Improve this Doc View Source

    SetEnumArgumentConverter(IHostedCommandsServiceBuilder, IArgumentConverter)

    Sets a fallback enum argument converter in Argument Converter Provider.

    Declaration
    public static IHostedCommandsServiceBuilder SetEnumArgumentConverter(this IHostedCommandsServiceBuilder builder, IArgumentConverter converter)
    Parameters
    Type Name Description
    IHostedCommandsServiceBuilder builder

    Hosted Commands Service builder.

    IArgumentConverter converter

    Converter to convert enums with.

    Returns
    Type Description
    IHostedCommandsServiceBuilder
    See Also
    IArgumentConverterProvider
    IArgumentConverter
    EnumConverter
    | Improve this Doc View Source

    SetPrefix(IHostedCommandsServiceBuilder, String)

    Sets prefix.

    Declaration
    public static IHostedCommandsServiceBuilder SetPrefix(this IHostedCommandsServiceBuilder builder, string prefix)
    Parameters
    Type Name Description
    IHostedCommandsServiceBuilder builder

    Hosted Commands Service builder.

    System.String prefix

    Prefix value.

    Returns
    Type Description
    IHostedCommandsServiceBuilder
    See Also
    Prefix
    | Improve this Doc View Source

    SetPrefix(IHostedCommandsServiceBuilder, String, PrefixRequirement)

    Sets prefix and prefix requirement.

    Declaration
    public static IHostedCommandsServiceBuilder SetPrefix(this IHostedCommandsServiceBuilder builder, string prefix, PrefixRequirement requirement)
    Parameters
    Type Name Description
    IHostedCommandsServiceBuilder builder

    Hosted Commands Service builder.

    System.String prefix

    Prefix value.

    PrefixRequirement requirement

    Prefix requirement.

    Returns
    Type Description
    IHostedCommandsServiceBuilder
    See Also
    Prefix
    RequirePrefix
    | Improve this Doc View Source

    SetPrefixRequirement(IHostedCommandsServiceBuilder, PrefixRequirement)

    Sets prefix requirement.

    Declaration
    public static IHostedCommandsServiceBuilder SetPrefixRequirement(this IHostedCommandsServiceBuilder builder, PrefixRequirement requirement)
    Parameters
    Type Name Description
    IHostedCommandsServiceBuilder builder

    Hosted Commands Service builder.

    PrefixRequirement requirement

    Prefix requirement.

    Returns
    Type Description
    IHostedCommandsServiceBuilder
    See Also
    RequirePrefix