Redigera

Dela via


NamedServiceConfiguratorExtensions.ConfigureComponent Method

Definition

Overloads

ConfigureComponent<TComponent>(INamedServiceConfigurator, Func<IServiceProvider,String,TComponent>)

Adds a singleton component to a named service.

ConfigureComponent<TOptions,TComponent>(INamedServiceConfigurator, Func<IServiceProvider,String,TComponent>, Action<OptionsBuilder<TOptions>>)

Adds a singleton component to a named service and configures options for the named service.

ConfigureComponent<TComponent>(INamedServiceConfigurator, Func<IServiceProvider,String,TComponent>)

Source:
NamedServiceConfigurator.cs

Adds a singleton component to a named service.

public static void ConfigureComponent<TComponent> (this Orleans.Hosting.INamedServiceConfigurator configurator, Func<IServiceProvider,string,TComponent> factory) where TComponent : class;
static member ConfigureComponent : Orleans.Hosting.INamedServiceConfigurator * Func<IServiceProvider, string, 'Component (requires 'Component : null)> -> unit (requires 'Component : null)
<Extension()>
Public Sub ConfigureComponent(Of TComponent As Class) (configurator As INamedServiceConfigurator, factory As Func(Of IServiceProvider, String, TComponent))

Type Parameters

TComponent

The component service type.

Parameters

configurator
INamedServiceConfigurator

The named configurator which the component will be configured for.

factory
Func<IServiceProvider,String,TComponent>

The factory used to create the component for the named service.

Applies to

ConfigureComponent<TOptions,TComponent>(INamedServiceConfigurator, Func<IServiceProvider,String,TComponent>, Action<OptionsBuilder<TOptions>>)

Source:
NamedServiceConfigurator.cs

Adds a singleton component to a named service and configures options for the named service.

public static void ConfigureComponent<TOptions,TComponent> (this Orleans.Hosting.INamedServiceConfigurator configurator, Func<IServiceProvider,string,TComponent> factory, Action<Microsoft.Extensions.Options.OptionsBuilder<TOptions>> configureOptions = default) where TOptions : class, new() where TComponent : class;
static member ConfigureComponent : Orleans.Hosting.INamedServiceConfigurator * Func<IServiceProvider, string, 'Component (requires 'Component : null)> * Action<Microsoft.Extensions.Options.OptionsBuilder<'Options>> -> unit (requires 'Options : null and 'Options : (new : unit -> 'Options) and 'Component : null)
<Extension()>
Public Sub ConfigureComponent(Of TOptions As {Class, New}, TComponent As {Class, New}) (configurator As INamedServiceConfigurator, factory As Func(Of IServiceProvider, String, TComponent), Optional configureOptions As Action(Of OptionsBuilder(Of TOptions)) = Nothing)

Type Parameters

TOptions

The options type being configured.

TComponent

The component service type being registered.

Parameters

configurator
INamedServiceConfigurator

The named configurator which the component and options will be configured for.

factory
Func<IServiceProvider,String,TComponent>

The factory used to create the component for the named service.

configureOptions
Action<OptionsBuilder<TOptions>>

The delegate used to configure options for the named service.

Applies to