Class KookClientDependencyInjectionExtensions
- Namespace
- Kook.Net.DependencyInjection.Microsoft
- Assembly
- Kook.Net.DependencyInjection.Microsoft.dll
提供用于与 Microsoft.Extensions.DependencyInjection 集成,注册与配置 Kook.Net 客户端作为服务的扩展方法。
public static class KookClientDependencyInjectionExtensions
- Inheritance
-
KookClientDependencyInjectionExtensions
- Inherited Members
Methods
AddKeyedKookRestClient(IServiceCollection, string?)
向指定的 IServiceCollection 添加 KookRestClient 客户端。
public static IServiceCollection AddKeyedKookRestClient(this IServiceCollection services, string? serviceKey)
Parameters
servicesIServiceCollection要向其添加 KOOK REST 客户端的服务集合。
serviceKeystring服务的键。
Returns
- IServiceCollection
添加了 KOOK REST 客户端的服务集合。
AddKeyedKookRestClient(IServiceCollection, string?, KookRestConfig)
向指定的 IServiceCollection 添加 KookRestClient 客户端。
public static IServiceCollection AddKeyedKookRestClient(this IServiceCollection services, string? serviceKey, KookRestConfig config)
Parameters
servicesIServiceCollection要向其添加 KOOK REST 客户端的服务集合。
serviceKeystring服务的键。
configKookRestConfig用于配置 KOOK REST 客户端的配置。
Returns
- IServiceCollection
添加了 KOOK REST 客户端的服务集合。
AddKeyedKookRestClient(IServiceCollection, string?, Action<KookRestConfig>)
向指定的 IServiceCollection 添加 KookRestClient 客户端。
public static IServiceCollection AddKeyedKookRestClient(this IServiceCollection services, string? serviceKey, Action<KookRestConfig> configure)
Parameters
servicesIServiceCollection要向其添加 KOOK REST 客户端的服务集合。
serviceKeystring服务的键。
configureAction<KookRestConfig>用于配置 KOOK REST 客户端的配置委托。
Returns
- IServiceCollection
添加了 KOOK REST 客户端的服务集合。
AddKeyedKookSocketClient(IServiceCollection, string?)
向指定的 IServiceCollection 添加 KookSocketClient 客户端。
public static IServiceCollection AddKeyedKookSocketClient(this IServiceCollection services, string? serviceKey)
Parameters
servicesIServiceCollection要向其添加 KOOK 网关客户端的服务集合。
serviceKeystring服务的键。
Returns
- IServiceCollection
添加了 KOOK 网关客户端的服务集合。
AddKeyedKookSocketClient(IServiceCollection, string?, KookSocketConfig)
向指定的 IServiceCollection 添加 KookSocketClient 客户端。
public static IServiceCollection AddKeyedKookSocketClient(this IServiceCollection services, string? serviceKey, KookSocketConfig config)
Parameters
servicesIServiceCollection要向其添加 KOOK 网关客户端的服务集合。
serviceKeystring服务的键。
configKookSocketConfig用于配置 KOOK 网关客户端的配置。
Returns
- IServiceCollection
添加了 KOOK 网关客户端的服务集合。
AddKeyedKookSocketClient(IServiceCollection, string?, Action<KookSocketConfig>)
向指定的 IServiceCollection 添加 KookSocketClient 客户端。
public static IServiceCollection AddKeyedKookSocketClient(this IServiceCollection services, string? serviceKey, Action<KookSocketConfig> configure)
Parameters
servicesIServiceCollection要向其添加 KOOK 网关客户端的服务集合。
serviceKeystring服务的键。
configureAction<KookSocketConfig>用于配置 KOOK 网关客户端的配置委托。
Returns
- IServiceCollection
添加了 KOOK 网关客户端的服务集合。
AddKeyedKookWebhookClient<TClient>(IServiceCollection, string?, Func<IServiceProvider, string?, TClient>)
向指定的 IServiceCollection 添加 KookWebhookClient 客户端。
public static IServiceCollection AddKeyedKookWebhookClient<TClient>(this IServiceCollection services, string? serviceKey, Func<IServiceProvider, string?, TClient> clientFactory) where TClient : KookWebhookClient
Parameters
servicesIServiceCollection要向其添加 KOOK Webhook 客户端的服务集合。
serviceKeystring服务的键。
clientFactoryFunc<IServiceProvider, string, TClient>用于创建 KOOK Webhook 客户端的委托。
Returns
- IServiceCollection
添加了 KOOK Webhook 客户端的服务集合。
Type Parameters
TClientWebhook 客户端的类型。
AddKeyedKookWebhookClient<TClient, TConfig>(IServiceCollection, string?, Func<IServiceProvider, TConfig, TClient>)
向指定的 IServiceCollection 添加 KookWebhookClient 客户端。
public static IServiceCollection AddKeyedKookWebhookClient<TClient, TConfig>(this IServiceCollection services, string? serviceKey, Func<IServiceProvider, TConfig, TClient> clientFactory) where TClient : KookWebhookClient where TConfig : KookWebhookConfig
Parameters
servicesIServiceCollection要向其添加 KOOK Webhook 客户端的服务集合。
serviceKeystring服务的键。
clientFactoryFunc<IServiceProvider, TConfig, TClient>用于创建 KOOK Webhook 客户端的委托。
Returns
- IServiceCollection
添加了 KOOK Webhook 客户端的服务集合。
Type Parameters
TClientWebhook 客户端的类型。
TConfigWebhook 客户端的配置类型。
AddKeyedKookWebhookClient<TClient, TConfig>(IServiceCollection, string?, Func<IServiceProvider, TConfig, TClient>, TConfig)
向指定的 IServiceCollection 添加 KookWebhookClient 客户端。
public static IServiceCollection AddKeyedKookWebhookClient<TClient, TConfig>(this IServiceCollection services, string? serviceKey, Func<IServiceProvider, TConfig, TClient> clientFactory, TConfig config) where TClient : KookWebhookClient where TConfig : KookWebhookConfig
Parameters
servicesIServiceCollection要向其添加 KOOK Webhook 客户端的服务集合。
serviceKeystring服务的键。
clientFactoryFunc<IServiceProvider, TConfig, TClient>用于创建 KOOK Webhook 客户端的委托。
configTConfig用于配置 KOOK Webhook 客户端的配置。
Returns
- IServiceCollection
添加了 KOOK Webhook 客户端的服务集合。
Type Parameters
TClientWebhook 客户端的类型。
TConfigWebhook 客户端的配置类型。
AddKookRestClient(IServiceCollection)
向指定的 IServiceCollection 添加 KookRestClient 客户端。
public static IServiceCollection AddKookRestClient(this IServiceCollection services)
Parameters
servicesIServiceCollection要向其添加 KOOK REST 客户端的服务集合。
Returns
- IServiceCollection
添加了 KOOK REST 客户端的服务集合。
AddKookRestClient(IServiceCollection, KookRestConfig)
向指定的 IServiceCollection 添加 KookRestClient 客户端。
public static IServiceCollection AddKookRestClient(this IServiceCollection services, KookRestConfig config)
Parameters
servicesIServiceCollection要向其添加 KOOK REST 客户端的服务集合。
configKookRestConfig用于配置 KOOK REST 客户端的配置。
Returns
- IServiceCollection
添加了 KOOK REST 客户端的服务集合。
AddKookRestClient(IServiceCollection, Action<KookRestConfig>)
向指定的 IServiceCollection 添加 KookRestClient 客户端。
public static IServiceCollection AddKookRestClient(this IServiceCollection services, Action<KookRestConfig> configure)
Parameters
servicesIServiceCollection要向其添加 KOOK REST 客户端的服务集合。
configureAction<KookRestConfig>用于配置 KOOK REST 客户端的配置委托。
Returns
- IServiceCollection
添加了 KOOK REST 客户端的服务集合。
AddKookSocketClient(IServiceCollection)
向指定的 IServiceCollection 添加 KookSocketClient 客户端。
public static IServiceCollection AddKookSocketClient(this IServiceCollection services)
Parameters
servicesIServiceCollection要向其添加 KOOK 网关客户端的服务集合。
Returns
- IServiceCollection
添加了 KOOK 网关客户端的服务集合。
AddKookSocketClient(IServiceCollection, KookSocketConfig)
向指定的 IServiceCollection 添加 KookSocketClient 客户端。
public static IServiceCollection AddKookSocketClient(this IServiceCollection services, KookSocketConfig config)
Parameters
servicesIServiceCollection要向其添加 KOOK 网关客户端的服务集合。
configKookSocketConfig用于配置 KOOK 网关客户端的配置。
Returns
- IServiceCollection
添加了 KOOK 网关客户端的服务集合。
AddKookSocketClient(IServiceCollection, Action<KookSocketConfig>)
向指定的 IServiceCollection 添加 KookSocketClient 客户端。
public static IServiceCollection AddKookSocketClient(this IServiceCollection services, Action<KookSocketConfig> configure)
Parameters
servicesIServiceCollection要向其添加 KOOK 网关客户端的服务集合。
configureAction<KookSocketConfig>用于配置 KOOK 网关客户端的配置委托。
Returns
- IServiceCollection
添加了 KOOK 网关客户端的服务集合。
AddKookWebhookClient<TClient>(IServiceCollection, Func<IServiceProvider, TClient>)
向指定的 IServiceCollection 添加 KookWebhookClient 客户端。
public static IServiceCollection AddKookWebhookClient<TClient>(this IServiceCollection services, Func<IServiceProvider, TClient> clientFactory) where TClient : KookWebhookClient
Parameters
servicesIServiceCollection要向其添加 KOOK Webhook 客户端的服务集合。
clientFactoryFunc<IServiceProvider, TClient>用于创建 KOOK Webhook 客户端的委托。
Returns
- IServiceCollection
添加了 KOOK Webhook 客户端的服务集合。
Type Parameters
TClientWebhook 客户端的类型。
AddKookWebhookClient<TClient, TConfig>(IServiceCollection, Func<IServiceProvider, IOptions<TConfig>, TClient>)
向指定的 IServiceCollection 添加 KookWebhookClient 客户端。
public static IServiceCollection AddKookWebhookClient<TClient, TConfig>(this IServiceCollection services, Func<IServiceProvider, IOptions<TConfig>, TClient> clientFactory) where TClient : KookWebhookClient where TConfig : KookWebhookConfig
Parameters
servicesIServiceCollection要向其添加 KOOK Webhook 客户端的服务集合。
clientFactoryFunc<IServiceProvider, IOptions<TConfig>, TClient>用于创建 KOOK Webhook 客户端的委托。
Returns
- IServiceCollection
添加了 KOOK Webhook 客户端的服务集合。
Type Parameters
TClientWebhook 客户端的类型。
TConfigWebhook 客户端的配置类型。
AddKookWebhookClient<TClient, TConfig>(IServiceCollection, Func<IServiceProvider, IOptions<TConfig>, TClient>, Action<TConfig>)
向指定的 IServiceCollection 添加 KookWebhookClient 客户端。
public static IServiceCollection AddKookWebhookClient<TClient, TConfig>(this IServiceCollection services, Func<IServiceProvider, IOptions<TConfig>, TClient> clientFactory, Action<TConfig> configure) where TClient : KookWebhookClient where TConfig : KookWebhookConfig
Parameters
servicesIServiceCollection要向其添加 KOOK Webhook 客户端的服务集合。
clientFactoryFunc<IServiceProvider, IOptions<TConfig>, TClient>用于创建 KOOK Webhook 客户端的委托。
configureAction<TConfig>用于配置 KOOK Webhook 客户端的配置委托。
Returns
- IServiceCollection
添加了 KOOK Webhook 客户端的服务集合。
Type Parameters
TClientWebhook 客户端的类型。
TConfigWebhook 客户端的配置类型。
AddKookWebhookClient<TClient, TConfig>(IServiceCollection, Func<IServiceProvider, TConfig, TClient>)
向指定的 IServiceCollection 添加 KookWebhookClient 客户端。
public static IServiceCollection AddKookWebhookClient<TClient, TConfig>(this IServiceCollection services, Func<IServiceProvider, TConfig, TClient> clientFactory) where TClient : KookWebhookClient where TConfig : KookWebhookConfig
Parameters
servicesIServiceCollection要向其添加 KOOK Webhook 客户端的服务集合。
clientFactoryFunc<IServiceProvider, TConfig, TClient>用于创建 KOOK Webhook 客户端的委托。
Returns
- IServiceCollection
添加了 KOOK Webhook 客户端的服务集合。
Type Parameters
TClientWebhook 客户端的类型。
TConfigWebhook 客户端的配置类型。
AddKookWebhookClient<TClient, TConfig>(IServiceCollection, Func<IServiceProvider, TConfig, TClient>, TConfig)
向指定的 IServiceCollection 添加 KookWebhookClient 客户端。
public static IServiceCollection AddKookWebhookClient<TClient, TConfig>(this IServiceCollection services, Func<IServiceProvider, TConfig, TClient> clientFactory, TConfig config) where TClient : KookWebhookClient where TConfig : KookWebhookConfig
Parameters
servicesIServiceCollection要向其添加 KOOK Webhook 客户端的服务集合。
clientFactoryFunc<IServiceProvider, TConfig, TClient>用于创建 KOOK Webhook 客户端的委托。
configTConfig用于配置 KOOK Webhook 客户端的配置。
Returns
- IServiceCollection
添加了 KOOK Webhook 客户端的服务集合。
Type Parameters
TClientWebhook 客户端的类型。
TConfigWebhook 客户端的配置类型。