Class ServiceCollectionExtensions
Contains all the extensions methods for Microsoft.Extensions.DependencyInjection.IServiceCollection.
Inheritance
Inherited Members
Namespace: Color_Chan.Discord.Commands.Extensions
Assembly: Color-Chan.Discord.Commands.dll
Syntax
public static class ServiceCollectionExtensions
Methods
| Improve this Doc View SourceAddColorChanDiscordCommand(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. |
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 |
Returns
Type | Description |
---|---|
Microsoft.Extensions.DependencyInjection.IServiceCollection | The updated Microsoft.Extensions.DependencyInjection.IServiceCollection. |
Type Parameters
Name | Description |
---|---|
TPipeline | The new IInteractionPipeline. |