OptionConfigureExtensionMethods.TryConfigureFormatter<TOptions,TOptionFormatter> 方法

定义

如果尚未配置任何选项,则为 TOptions 配置选项格式化程序。

public static Microsoft.Extensions.DependencyInjection.IServiceCollection TryConfigureFormatter<TOptions,TOptionFormatter> (this Microsoft.Extensions.DependencyInjection.IServiceCollection services) where TOptions : class where TOptionFormatter : class, Orleans.IOptionFormatter<TOptions>;
static member TryConfigureFormatter : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection (requires 'Options : null and 'OptionFormatter : null and 'OptionFormatter :> Orleans.IOptionFormatter<'Options>)
<Extension()>
Public Function TryConfigureFormatter(Of TOptions As Class, TOptionFormatter As Class) (services As IServiceCollection) As IServiceCollection

类型参数

TOptions

选项类型。

TOptionFormatter

选项格式化程序类型。

参数

services
IServiceCollection

服务。

返回

IServiceCollection用于与其他调用链接。

适用于