src/Orleans.Core/Configuration/OptionLogger/OptionFormatterExtensionMethods.cs
/// <summary>
/// Configures an options formatter for <typeparamref name="TOptions"/>.
/// </summary>
/// <remarks>
/// This will use the default options formatter unless a non-default formatter is configured.
/// </remarks>
/// <param name="services">
/// The services.
/// </param>
/// <typeparam name="TOptions">
/// The options type.
/// </typeparam>
/// <returns>
/// The <see cref="IServiceCollection"/>, for chaining with other calls.
/// </returns>
Configures an options formatter for .
Configures an options formatter for .
public static IServiceCollection ConfigureFormatter<TOptions>(this IServiceCollection services)
            where TOptions : class, new()
        {
            return services.AddSingleton<IOptionFormatter>(sp => sp.GetService<IOptionFormatter<TOptions>>());
        }
public static IServiceCollection ConfigureFormatter < TOptions > ( this IServiceCollection services ) where TOptions : class , new ( ) { return services . AddSingleton < IOptionFormatter > ( sp => sp . GetService < IOptionFormatter < TOptions > > ( ) ) ; }
Configures an options formatter for .
Configures an options formatter for .
The , for chaining with other calls.
The for chaining with other calls .
IServiceCollection
this
services
None
remarks
This will use the default options formatter unless a non-default formatter is configured.
This will use the default options formatter unless a non - default formatter is configured .
typeparam
The options type.
The options type .