Show / Hide Table of Contents

    Class TransportMetadataProvider<TTransportMetadata>

    Defines a method for retrieving transport metadata for a service contract in a given application.

    Inheritance
    System.Object
    TransportMetadataProvider<TTransportMetadata>
    ManagerTransportMetadataProvider
    ManagerTransportMetadataProvider
    ManagerTransportMetadataProvider
    ManagerTransportMetadataProvider
    ManagerTransportMetadataProvider
    ManagerTransportMetadataProvider
    Implements
    ITransportMetadataProvider<TTransportMetadata>
    Namespace: Copper.Conventions.Method.Common.V1
    Assembly: Copper.Conventions.Method.Common.dll
    Syntax
    public abstract class TransportMetadataProvider<TTransportMetadata> : ITransportMetadataProvider<TTransportMetadata> where TTransportMetadata : class
    Type Parameters
    Name Description
    TTransportMetadata

    The transport metadata type.

    Constructors

    View Source

    TransportMetadataProvider(IDiscoveryClientBuilderFactory, IOptionsMonitor<TransportMetadataProviderOptions>, IDistributedCache)

    Initializes a new instance of the TransportMetadataProvider<TTransportMetadata> class.

    Declaration
    protected TransportMetadataProvider(IDiscoveryClientBuilderFactory discoveryClientBuilderFactory, IOptionsMonitor<TransportMetadataProviderOptions> transportMetadataProviderOptions, IDistributedCache distributedCache)
    Parameters
    Type Name Description
    IDiscoveryClientBuilderFactory discoveryClientBuilderFactory

    The discovery client builder factory.

    IOptionsMonitor<TransportMetadataProviderOptions> transportMetadataProviderOptions

    The transport metadata provider options.

    IDistributedCache distributedCache

    The distributed cache.

    Methods

    View Source

    GetServiceDiscoveryCriteriaFor<TContract>(String)

    Gets the service discovery criteria.

    Declaration
    protected abstract ServiceDiscoveryCriteria GetServiceDiscoveryCriteriaFor<TContract>(string applicationName)
        where TContract : class
    Parameters
    Type Name Description
    System.String applicationName

    The application name.

    Returns
    Type Description
    ServiceDiscoveryCriteria

    The service discovery metadata.

    Type Parameters
    Name Description
    TContract

    The contract type.

    View Source

    GetTransportMetadataFor<TContract>(ServiceDiscoveryResponse)

    Gets the transport metadata.

    Declaration
    protected abstract TTransportMetadata GetTransportMetadataFor<TContract>(ServiceDiscoveryResponse serviceDiscoveryResponse)
        where TContract : class
    Parameters
    Type Name Description
    ServiceDiscoveryResponse serviceDiscoveryResponse

    The service discovery response.

    Returns
    Type Description
    TTransportMetadata

    The transport metadata.

    Type Parameters
    Name Description
    TContract

    The contract type.

    View Source

    RetrieveTransportMetadataFor<TContract>(String, Boolean)

    Retrieves the transport metadata for a service contract in a given application.

    Declaration
    public async Task<TTransportMetadata> RetrieveTransportMetadataFor<TContract>(string applicationName, bool useCachedTransportMetadataIfAvailable)
        where TContract : class
    Parameters
    Type Name Description
    System.String applicationName

    The Application name.

    System.Boolean useCachedTransportMetadataIfAvailable

    true if cached transport metadata should be used if available; otherwise, false.

    Returns
    Type Description
    System.Threading.Tasks.Task<TTransportMetadata>

    The transport metadata.

    Type Parameters
    Name Description
    TContract

    The contract type.

    Implements

    ITransportMetadataProvider<TTransportMetadata>
    • View Source
    Back to top Generated by DocFX