DryIocDependencyResolver.HasRegistration(Type?, string?) method¶
Defined in
Type: DryIocDependencyResolver
Namespace: Splat.DryIoc
Assembly: Splat.DryIoc.dll
Applies to
net10.0, net9.0, net9.0, net8.0, net8.0, netstandard2.0, netstandard2.0, net462, net481
Overloads¶
-
public bool HasRegistration(Type? serviceType, string? contract) -
public bool HasRegistration(Type? serviceType) -
public bool HasRegistration<T>() -
public bool HasRegistration<T>(string? contract)
1. Overload¶
public bool HasRegistration(Type? serviceType, string? contract)
Inherited documentation
These docs were inherited from IMutableDependencyResolver. The member doesn't override them on this type.
Summary: Determines whether a registration exists for the specified service type and contract.
Parameters
| Name | Type | Description |
|---|---|---|
serviceType | Type? | The type of the service to check for registration. Can be null to indicate a default or unspecified service type, depending on the implementation. |
contract | string? | An optional contract name that distinguishes between multiple registrations of the same service type. Can be null or empty to indicate the default contract. |
Returns: bool -- true if a registration exists for the specified service type and contract; otherwise, false.
2. Overload¶
public bool HasRegistration(Type? serviceType)
Inherited documentation
These docs were inherited from IMutableDependencyResolver. The member doesn't override them on this type.
Summary: Determines whether a registration exists for the specified service type.
Parameters
| Name | Type | Description |
|---|---|---|
serviceType | Type? | The type of the service to check for registration. Can be null to indicate an unspecified service type. |
Returns: bool -- true if a registration exists for the specified service type; otherwise, false.
3. Overload¶
public bool HasRegistration<T>()
Inherited documentation
These docs were inherited from IMutableDependencyResolver. The member doesn't override them on this type.
Summary: Determines whether a registration exists for the specified service type.
Type parameters
| Name | Description |
|---|---|
T | The type of the service to check for registration. |
Returns: bool -- true if a registration for the specified service type exists; otherwise, false.
4. Overload¶
public bool HasRegistration<T>(string? contract)
Inherited documentation
These docs were inherited from IMutableDependencyResolver. The member doesn't override them on this type.
Summary: Determines whether a registration exists for the specified service type and contract.
Type parameters
| Name | Description |
|---|---|
T | The service type to check for a registration. |
Parameters
| Name | Type | Description |
|---|---|---|
contract | string? | An optional contract name that identifies a specific registration. Can be null to check for the default registration. |
Returns: bool -- true if a registration exists for the specified service type and contract; otherwise, false.