src/Orleans.Core/Configuration/NamedServiceConfigurator.cs
/// <summary>
/// Configures options for a named service.
/// </summary>
/// <param name="configurator">
/// The named service configurator.
/// </param>
/// <param name="configureOptions">
/// The options configuration delegate.
/// </param>
/// <typeparam name="TOptions">
/// The underlying options type.
/// </typeparam>
Configures options for a named service.
Configures options for a named service .
public static void Configure<TOptions>(this INamedServiceConfigurator configurator, Action<OptionsBuilder<TOptions>> configureOptions)
            where TOptions : class, new()
        {
            configurator.ConfigureDelegate(services =>
            {
                configureOptions?.Invoke(services.AddOptions<TOptions>(configurator.Name));
                services.ConfigureNamedOptionForLogging<TOptions>(configurator.Name);
            });
        }
public static void Configure < TOptions > ( this INamedServiceConfigurator configurator , Action < OptionsBuilder < TOptions > > configureOptions ) where TOptions : class , new ( ) { configurator . ConfigureDelegate ( services => { configureOptions ? . Invoke ( services . AddOptions < TOptions > ( configurator . Name ) ) ; services . ConfigureNamedOptionForLogging < TOptions > ( configurator . Name ) ; } ) ; }
Configures options for a named service.
Configures options for a named service .
INamedServiceConfigurator
this
configureOptions
Action<OptionsBuilder<TOptions>>
The options configuration delegate.
The options configuration delegate .
configurator
The named service configurator.
The named service configurator .
typeparam
The underlying options type.
The underlying options type .