Class ServiceImplementsContractValidator
Provides capabilities to validate if a given implementation type implements a given contract type.
Inheritance
System.Object
ServiceImplementsContractValidator
Namespace: Copper.Service.Validators
Assembly: Copper.Service.dll
Syntax
public static class ServiceImplementsContractValidator
Methods
View SourceImplementsServiceContract(Type, Type)
Validates if a given implementation type implements a given contract type.
Declaration
public static bool ImplementsServiceContract(Type implementationType, Type contractType)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Type | implementationType | The implementation type. |
| System.Type | contractType | The contract type. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
|
Validate(Type, Type)
Validates if a given implementation type implements a given contract type.
Declaration
public static void Validate(Type implementationType, Type contractType)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Type | implementationType | The implementation type. |
| System.Type | contractType | The contract type. |
Exceptions
| Type | Condition |
|---|---|
| System.InvalidOperationException | The given implementation type does not implement the given contract type. |
Validate<TImplementation>(Type)
Validates if a given implementation type implements a given contract type.
Declaration
public static void Validate<TImplementation>(Type contractType)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Type | contractType | The contract type. |
Type Parameters
| Name | Description |
|---|---|
| TImplementation | The implementation type. |
Exceptions
| Type | Condition |
|---|---|
| System.InvalidOperationException | The given implementation type does not implement the given contract type. |