src/Orleans.Core/Utils/NamedOptionExtension.cs
/// <summary>
/// Gets a named options instance.
/// </summary>
/// <typeparam name="TOption">The type of the t option.</typeparam>
/// <param name="services">The services.</param>
/// <param name="name">The name.</param>
/// <returns>TOption.</returns>
Gets a named options instance.
Gets a named options instance .
public static TOption GetOptionsByName<TOption>(this IServiceProvider services, string name)
            where TOption : class, new()
        {
            return services.GetRequiredService<IOptionsMonitor<TOption>>().Get(name);
        }
public static TOption GetOptionsByName < TOption > ( this IServiceProvider services , string name ) where TOption : class , new ( ) { return services . GetRequiredService < IOptionsMonitor < TOption > > ( ) . Get ( name ) ; }
Gets a named options instance.
Gets a named options instance .
None
IServiceProvider
this
name
string
None
services
None
typeparam
The type of the t option.
The type of the t option .