共用方式為


OptionConfigureExtensionMethods.ConfigureFormatter 方法

定義

多載

ConfigureFormatter<TOptions,TOptionFormatter>(IServiceCollection)

設定 的選項格式器 TOptions

ConfigureFormatter<TOptions>(IServiceCollection)

設定 的選項格式器 TOptions

ConfigureFormatter<TOptions,TOptionFormatter>(IServiceCollection)

來源:
OptionFormatterExtensionMethods.cs

設定 的選項格式器 TOptions

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

類型參數

TOptions

選項類型。

TOptionFormatter

選項格式器類型。

參數

services
IServiceCollection

服務。

傳回

IServiceCollection 用於與其他呼叫鏈結。

適用於

ConfigureFormatter<TOptions>(IServiceCollection)

來源:
OptionFormatterExtensionMethods.cs

設定 的選項格式器 TOptions

public static Microsoft.Extensions.DependencyInjection.IServiceCollection ConfigureFormatter<TOptions> (this Microsoft.Extensions.DependencyInjection.IServiceCollection services) where TOptions : class, new();
static member ConfigureFormatter : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection (requires 'Options : null and 'Options : (new : unit -> 'Options))
<Extension()>
Public Function ConfigureFormatter(Of TOptions As {Class, New}) (services As IServiceCollection) As IServiceCollection

類型參數

TOptions

選項類型。

參數

services
IServiceCollection

服務。

傳回

IServiceCollection 用於與其他呼叫鏈結。

備註

除非設定非預設格式器,否則這會使用預設選項格式器。

適用於