Table of Contents

Interface IKookClientServiceConfigurator

Namespace
Kook.Net.DependencyInjection.Microsoft
Assembly
Kook.Net.DependencyInjection.Microsoft.dll

表示一个通用的 KOOK 客户端服务配置器。

public interface IKookClientServiceConfigurator : IKookClientConfiguratorCompleter
Inherited Members
Extension Methods

Methods

UseRestClient(Action<KookRestConfig>)

配置使用 REST 客户端。

IKookClientConfigurator<KookRestClient, KookRestConfig> UseRestClient(Action<KookRestConfig> configure)

Parameters

configure Action<KookRestConfig>

配置操作。

Returns

IKookClientConfigurator<KookRestClient, KookRestConfig>

配置了 REST 客户端的配置器。

UseSocketClient(Action<KookSocketConfig>)

配置使用网关客户端。

IKookClientConfigurator<KookSocketClient, KookSocketConfig> UseSocketClient(Action<KookSocketConfig> configure)

Parameters

configure Action<KookSocketConfig>

配置操作。

Returns

IKookClientConfigurator<KookSocketClient, KookSocketConfig>

配置了网关客户端的配置器。

UseWebhookClient<TClient, TConfig>(Func<IServiceProvider, IOptions<TConfig>, TClient>, Action<TConfig>)

配置使用基于 Webhook 的网关客户端。

IKookClientConfigurator<TClient, TConfig> UseWebhookClient<TClient, TConfig>(Func<IServiceProvider, IOptions<TConfig>, TClient> clientFactory, Action<TConfig> configure) where TClient : KookWebhookClient where TConfig : KookWebhookConfig

Parameters

clientFactory Func<IServiceProvider, IOptions<TConfig>, TClient>

客户端创建委托。

configure Action<TConfig>

配置操作。

Returns

IKookClientConfigurator<TClient, TConfig>

配置了基于 Webhook 的网关客户端的配置器。

Type Parameters

TClient

客户端的类型。

TConfig

配置的类型。