src/Orleans.Core/Configuration/OptionLogger/OptionFormatterExtensionMethods.cs
/// <summary>
/// Configures a named option to be logged.
/// </summary>
/// <typeparam name="TOptions">
/// The option object's type.
/// </typeparam>
/// <param name="services">
/// The services.
/// </param>
/// <param name="name">
/// The option object's name.
/// </param>
/// <returns>
/// The <see cref="IServiceCollection"/>, for chaining with other calls.
/// </returns>
Configures a named option to be logged.
Configures a named option to be logged .
public static IServiceCollection ConfigureNamedOptionForLogging<TOptions>(this IServiceCollection services, string name)
            where TOptions : class
        {
            return services.AddSingleton<IOptionFormatter>(sp => sp.GetService<IOptionFormatterResolver<TOptions>>().Resolve(name));
        }
public static IServiceCollection ConfigureNamedOptionForLogging < TOptions > ( this IServiceCollection services , string name ) where TOptions : class { return services . AddSingleton < IOptionFormatter > ( sp => sp . GetService < IOptionFormatterResolver < TOptions > > ( ) . Resolve ( name ) ) ; }
Configures a named option to be logged.
Configures a named option to be logged .
The , for chaining with other calls.
The for chaining with other calls .
IServiceCollection
this
name
string
The option object's name.
The option object ' s name .
services
None
typeparam
The option object's type.
The option object ' s type .