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

    Class CommandHandlerDescriptorExtensions

    Extensions for command handler descriptors.

    Inheritance
    System.Object
    CommandHandlerDescriptorExtensions
    Namespace: TehGM.Wolfringo.Commands.Initialization
    Assembly: Wolfringo.Commands.dll
    Syntax
    public static class CommandHandlerDescriptorExtensions

    Methods

    | Improve this Doc View Source

    IsPersistent(ICommandHandlerDescriptor)

    Checks if the command handler is persistent.

    Declaration
    public static bool IsPersistent(this ICommandHandlerDescriptor descriptor)
    Parameters
    Type Name Description
    ICommandHandlerDescriptor descriptor

    Command handler descriptor.

    Returns
    Type Description
    System.Boolean

    True if handler is persistent; otherwise false.

    Remarks

    This value will only return true if handler's type has CommandsHandlerAttribute. If the attribute is not present (for example, when handler was force-initialized without command discovery), it'll always return false.

    It's up to ICommandsHandlerProvider to respect this value. CommandsHandlerProvider included with Wolfringo will always respect it and cache handlers if this value is true.