Search Results for

    Show / Hide Table of Contents

    Class ServiceCollectionExtensions

    Contains all the extensions methods for Microsoft.Extensions.DependencyInjection.IServiceCollection.

    Inheritance
    System.Object
    ServiceCollectionExtensions
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.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 Microsoft.Extensions.DependencyInjection.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
    Microsoft.Extensions.DependencyInjection.IServiceCollection services

    The Microsoft.Extensions.DependencyInjection.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
    Microsoft.Extensions.DependencyInjection.IServiceCollection

    The updated Microsoft.Extensions.DependencyInjection.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
    Microsoft.Extensions.DependencyInjection.IServiceCollection services

    The Microsoft.Extensions.DependencyInjection.IServiceCollection where the TPipeline will be added to.

    Returns
    Type Description
    Microsoft.Extensions.DependencyInjection.IServiceCollection

    The updated Microsoft.Extensions.DependencyInjection.IServiceCollection.

    Type Parameters
    Name Description
    TPipeline

    The new IInteractionPipeline.

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