IServiceLocator.GetServices() method¶
Defined in
Type: IServiceLocator
Namespace: Splat
Assembly: Splat.Core.dll
Applies to
net10.0, net9.0, net8.0, net462, net481
Overloads¶
-
IEnumerable<T> GetServices<T>() -
IEnumerable<T> GetServices<T>(string contract)
1. Overload¶
IEnumerable<T> GetServices<T>()
Summary: Gets all registered service instances of the specified type.
Type parameters
| Name | Description |
|---|---|
T | The type of service to retrieve. |
Returns: IEnumerable
2. Overload¶
IEnumerable<T> GetServices<T>(string contract)
Summary: Gets all registered service instances of the specified type that match the given contract name.
Type parameters
| Name | Description |
|---|---|
T | The type of service to retrieve. |
Parameters
| Name | Type | Description |
|---|---|---|
contract | string | The contract name used to filter the services. Only services registered with this contract will be returned. Cannot be null. |
Returns: IEnumerable