src/Orleans.Core.Abstractions/Utils/IKeyedServiceCollection.cs
/// <summary>
/// Acquire a service by name, throwing if it is not found.
/// </summary>
/// <typeparam name="TService">
/// The service type.
/// </typeparam>
/// <param name="services">
/// The service provider.
/// </param>
/// <param name="name">
/// The service name.
/// </param>
/// <returns>The service.</returns>
Acquire a service by name, throwing if it is not found.
Acquire a service by name throwing if it is not found .
public static TService GetRequiredServiceByName<TService>(this IServiceProvider services, string name)
            where TService : class
        {
            return services.GetRequiredServiceByKey<string, TService>(name);
        }
public static TService GetRequiredServiceByName < TService > ( this IServiceProvider services , string name ) where TService : class { return services . GetRequiredServiceByKey < string , TService > ( name ) ; }
Acquire a service by name, throwing if it is not found.
Acquire a service by name throwing if it is not found .
None
IServiceProvider
this
name
string
The service name.
The service name .
services
The service provider.
The service provider .
typeparam
The service type.
The service type .