API reference
Class ServiceCollectionExtensions
- Namespace
- DisCatSharp.Hosting.DependencyInjection
- Assembly
- DisCatSharp.Hosting.DependencyInjection.dll
The service collection extensions.
public static class ServiceCollectionExtensions
- Inheritance
-
ServiceCollectionExtensions
- Inherited Members
Methods
- AddDiscordHostedService<TService>(IServiceCollection)
Adds your bot as a BackgroundService, registered in Dependency Injection as
TService
- AddDiscordHostedService<TInterface, TService>(IServiceCollection)
Add
TServiceas a background service which derives fromTInterfaceand IDiscordHostedService
- AddDiscordHostedShardService<TService>(IServiceCollection)
Adds your bot as a BackgroundService, registered in Dependency Injection as
TService
- AddDiscordHostedShardService<TInterface, TService>(IServiceCollection)
Add
TServiceas a background service which derives fromTInterfaceand IDiscordHostedShardService