Search Results for

    Show / Hide Table of Contents

    Class ServiceCollectionExtensions

    Contains all the extensions methods for IServiceCollection.

    Inheritance
    Object
    ServiceCollectionExtensions
    Inherited Members
    System.Object.Equals(System.Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Object.ToString()
    Namespace: Color_Chan.Discord.Commands.Extensions
    Assembly: Color-Chan.Discord.Commands.dll
    Syntax
    public static class ServiceCollectionExtensions

    Methods

    | Improve this Doc View Source

    AddColorChanDiscordCommand(IServiceCollection, Action<SlashCommandConfiguration>, Action<CacheConfiguration>, Action<RedisCacheOptions>, Action<ComponentInteractionConfiguration>)

    Add the dependencies for Color-Chan.Discord.Command to the IServiceCollection.

    Declaration
    public static IServiceCollection AddColorChanDiscordCommand(this IServiceCollection services, Action<SlashCommandConfiguration> slashCommandConfigs = null, Action<CacheConfiguration> defaultCacheConfig = null, Action<RedisCacheOptions> redisCacheOptions = null, Action<ComponentInteractionConfiguration> componentInteractionConfig = null)
    Parameters
    Type Name Description
    IServiceCollection services

    The IServiceCollection.

    System.Action<SlashCommandConfiguration> slashCommandConfigs

    The configuration options for slash commands.

    System.Action<CacheConfiguration> defaultCacheConfig

    The default cache configurations. Leave this null to use the default expiration values.

    System.Action<Microsoft.Extensions.Caching.StackExchangeRedis.RedisCacheOptions> redisCacheOptions

    The cache options for the redis cache. Leave this null if you want to use a local cache.

    System.Action<ComponentInteractionConfiguration> componentInteractionConfig

    The configurations options for the component interactions.

    Returns
    Type Description
    IServiceCollection

    The updated IServiceCollection.

    | Improve this Doc View Source

    AddInteractionPipeline<TPipeline>(IServiceCollection)

    Adds a IInteractionPipeline to the services.

    Declaration
    public static IServiceCollection AddInteractionPipeline<TPipeline>(this IServiceCollection services)
        where TPipeline : class, IInteractionPipeline
    Parameters
    Type Name Description
    IServiceCollection services

    The IServiceCollection where the TPipeline will be added to.

    Returns
    Type Description
    IServiceCollection

    The updated IServiceCollection.

    Type Parameters
    Name Description
    TPipeline

    The new IInteractionPipeline.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX