Show / Hide Table of Contents

    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 Source

    ImplementsServiceContract(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

    true if the implementation type implements the contract type; otherwise, false.

    View Source

    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.

    View Source

    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.

    • View Source
    Back to top Generated by DocFX