Table of Contents

Class BaseCommandProcessor<TConverter, TConverterContext, TCommandContext>.ConverterDelegateFactory

Namespace
DSharpPlus.Commands.Processors
Assembly
DSharpPlus.Commands.dll

A factory used for creating and caching converter objects and delegates.

protected class BaseCommandProcessor<TConverter, TConverterContext, TCommandContext>.ConverterDelegateFactory
Inheritance
BaseCommandProcessor<TConverter, TConverterContext, TCommandContext>.ConverterDelegateFactory

Constructors

ConverterDelegateFactory(BaseCommandProcessor<TConverter, TConverterContext, TCommandContext>, Type, Type)

Creates a new converter delegate factory, which will obtain or construct ConverterInstance through the service provider as needed. The converter delegate will be created using the newly created converter instance.

ConverterDelegateFactory(BaseCommandProcessor<TConverter, TConverterContext, TCommandContext>, Type, TConverter)

Creates a new converter delegate factory, which will use the provided converter instance to create the delegate.

Properties

CommandProcessor

The command processor that this converter is associated with.

ConverterInstance

The converter instance, if it's already been created.

ConverterType

The converter's type (not to be confused with parameter type). Only available when passing the type to the constructor.

ParameterType

The parameter type that this converter converts to.

Methods

Equals(object?)

Determines whether the specified object is equal to the current object.

GetConverter(IServiceProvider)

Creates and caches the converter instance if it hasn't been created yet.

GetConverterDelegate(IServiceProvider)

Creates and caches the converter delegate if it hasn't been created yet.

GetHashCode()

Serves as the default hash function.

ToString()

Returns a string that represents the current object.

Operators

operator ==(ConverterDelegateFactory, ConverterDelegateFactory)
operator !=(ConverterDelegateFactory, ConverterDelegateFactory)