NinjectDependencyResolver.GetServices(Type?) method¶
Defined in
Type: NinjectDependencyResolver
Namespace: Splat.Ninject
Assembly: Splat.Ninject.dll
Applies to
net10.0, net9.0, net9.0, net8.0, net8.0, netstandard2.0, netstandard2.0, net462, net481
Overloads¶
-
public virtual IEnumerable<object> GetServices(Type? serviceType) -
public virtual IEnumerable<object> GetServices(Type? serviceType, string? contract) -
public IEnumerable<T> GetServices<T>() -
public IEnumerable<T> GetServices<T>(string? contract)
1. Overload¶
public virtual IEnumerable<object> GetServices(Type? serviceType)
Inherited documentation
These docs were inherited from IReadonlyDependencyResolver. The member doesn't override them on this type.
Summary:
Gets all instances of the given serviceType. Must return an empty
collection if the service is not available (must not return null or throw).
Parameters
| Name | Type | Description |
|---|---|---|
serviceType | Type? | The object type. |
Returns: IEnumerable -- A sequence of instances of the requested serviceType. The sequence
should be empty (not null) if no objects of the given type are available.
2. Overload¶
public virtual IEnumerable<object> GetServices(Type? serviceType, string? contract)
Inherited documentation
These docs were inherited from IReadonlyDependencyResolver. The member doesn't override them on this type.
Summary:
Gets all instances of the given serviceType. Must return an empty
collection if the service is not available (must not return null or throw).
Parameters
| Name | Type | Description |
|---|---|---|
serviceType | Type? | The object type. |
contract | string? | A value which will retrieve only objects registered with the same contract. |
Returns: IEnumerable -- A sequence of instances of the requested serviceType. The sequence
should be empty (not null) if no objects of the given type are available.
3. Overload¶
public IEnumerable<T> GetServices<T>()
Inherited documentation
These docs were inherited from IReadonlyDependencyResolver. The member doesn't override them on this type.
Summary:
Gets all instances of the given T. Must return an empty
collection if the service is not available (must not return null or throw).
Type parameters
| Name | Description |
|---|---|
T | The object type. |
Returns: IEnumerableT. The sequence
should be empty (not null) if no objects of the given type are available.
4. Overload¶
public IEnumerable<T> GetServices<T>(string? contract)
Inherited documentation
These docs were inherited from IReadonlyDependencyResolver. The member doesn't override them on this type.
Summary:
Gets all instances of the given T. Must return an empty
collection if the service is not available (must not return null or throw).
Type parameters
| Name | Description |
|---|---|
T | The object type. |
Parameters
| Name | Type | Description |
|---|---|---|
contract | string? | A value which will retrieve only objects registered with the same contract. |
Returns: IEnumerableT. The sequence
should be empty (not null) if no objects of the given type are available.