Class KeyedServiceCollectionExtensions
Inheritance
System.Object
KeyedServiceCollectionExtensions
Assembly: Orleans.Core.Abstractions.dll
Syntax
public static class KeyedServiceCollectionExtensions : object
Methods
|
Improve this Doc
View Source
GetRequiredServiceByKey<TKey, TService>(IServiceProvider, TKey)
Acquire a service by key. Throws KeyNotFound exception if key is not found.
Declaration
public static TService GetRequiredServiceByKey<TKey, TService>(this IServiceProvider services, TKey key)where TService : class
Parameters
| Type |
Name |
Description |
| IServiceProvider |
services |
|
| TKey |
key |
|
Returns
| Type |
Description |
| TService |
|
Type Parameters
| Name |
Description |
| TKey |
|
| TService |
|
|
Improve this Doc
View Source
GetRequiredServiceByName<TService>(IServiceProvider, String)
Acquire a service by name. Throws KeyNotFound exception if name is not found.
Declaration
public static TService GetRequiredServiceByName<TService>(this IServiceProvider services, string name)where TService : class
Parameters
| Type |
Name |
Description |
| IServiceProvider |
services |
|
| System.String |
name |
|
Returns
| Type |
Description |
| TService |
|
Type Parameters
| Name |
Description |
| TService |
|
|
Improve this Doc
View Source
GetServiceByKey<TKey, TService>(IServiceProvider, TKey)
Acquire a service by key.
Declaration
public static TService GetServiceByKey<TKey, TService>(this IServiceProvider services, TKey key)where TService : class
Parameters
| Type |
Name |
Description |
| IServiceProvider |
services |
|
| TKey |
key |
|
Returns
| Type |
Description |
| TService |
|
Type Parameters
| Name |
Description |
| TKey |
|
| TService |
|
|
Improve this Doc
View Source
GetServiceByName<TService>(IServiceProvider, String)
Acquire a service by name.
Declaration
public static TService GetServiceByName<TService>(this IServiceProvider services, string name)where TService : class
Parameters
| Type |
Name |
Description |
| IServiceProvider |
services |
|
| System.String |
name |
|
Returns
| Type |
Description |
| TService |
|
Type Parameters
| Name |
Description |
| TService |
|