src/Orleans.Core/Configuration/NamedServiceConfigurator.cs
/// <summary>
/// Adds a singleton component to a named service and configures options for the named service.
/// </summary>
/// <typeparam name="TOptions">The options type being configured.</typeparam>
/// <typeparam name="TComponent">The component service type being registered.</typeparam>
/// <param name="configurator">The named configurator which the component and options will be configured for.</param>
/// <param name="factory">The factory used to create the component for the named service.</param>
/// <param name="configureOptions">The delegate used to configure options for the named service.</param>
Adds a singleton component to a named service and configures options for the named service.
Adds a singleton component to a named service and configures options for the named service .
public static void ConfigureComponent<TOptions, TComponent>(this INamedServiceConfigurator configurator, Func<IServiceProvider, string, TComponent> factory, Action<OptionsBuilder<TOptions>> configureOptions = null)
            where TOptions : class, new()
            where TComponent : class
        {
            configurator.Configure(configureOptions);
            configurator.ConfigureComponent(factory);
        }
public static void ConfigureComponent < TOptions , TComponent > ( this INamedServiceConfigurator configurator , Func < IServiceProvider , string , TComponent > factory , Action < OptionsBuilder < TOptions > > configureOptions = null ) where TOptions : class , new ( ) where TComponent : class { configurator . Configure ( configureOptions ) ; configurator . ConfigureComponent ( factory ) ; }
Adds a singleton component to a named service and configures options for the named service.
Adds a singleton component to a named service and configures options for the named service .
INamedServiceConfigurator
this
factory
Func<IServiceProvider, string, TComponent>
The factory used to create the component for the named service.
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.
The delegate used to configure options for the named service .
configurator
The named configurator which the component and options will be configured for.
The named configurator which the component and options will be configured for .
typeparam
The options type being configured.
The options type being configured .
typeparam
The component service type being registered.
The component service type being registered .