Class TestClientServiceTransportMetadataProvider
Defines a method for retrieving transport metadata for a test client service contract in a given application.
Inheritance
System.Object
TestClientServiceTransportMetadataProvider
Namespace: Copper.Conventions.Method.Testing.Client.V1
Assembly: Copper.Conventions.Method.Testing.Client.dll
Syntax
public class TestClientServiceTransportMetadataProvider : TransportMetadataProvider<TransportMetadata>
Constructors
View SourceTestClientServiceTransportMetadataProvider(IDiscoveryClientBuilderFactory, IOptionsMonitor<TransportMetadataProviderOptions>, IDistributedCache)
Initializes a new instance of the Test
Declaration
public TestClientServiceTransportMetadataProvider(IDiscoveryClientBuilderFactory discoveryClientBuilderFactory, IOptionsMonitor<TransportMetadataProviderOptions> transportMetadataProviderOptions, IDistributedCache distributedCache)
Parameters
Type | Name | Description |
---|---|---|
IDiscovery |
discoveryClientBuilderFactory | The discovery client builder factory. |
IOptions |
transportMetadataProviderOptions | The transport metadata provider options. |
IDistributed |
distributedCache | The distributed cache. |
Methods
View SourceGetServiceDiscoveryCriteriaFor<TContract>(String)
Gets the service discovery criteria.
Declaration
protected override ServiceDiscoveryCriteria GetServiceDiscoveryCriteriaFor<TContract>(string applicationName)
Parameters
Type | Name | Description |
---|---|---|
System. |
applicationName | The application name. |
Returns
Type | Description |
---|---|
Service |
The service discovery metadata. |
Type Parameters
Name | Description |
---|---|
TContract | The contract type. |
GetTransportMetadataFor<TContract>(ServiceDiscoveryResponse)
Gets the transport metadata.
Declaration
protected override TransportMetadata GetTransportMetadataFor<TContract>(ServiceDiscoveryResponse serviceDiscoveryResponse)
Parameters
Type | Name | Description |
---|---|---|
Service |
serviceDiscoveryResponse | The service discovery response. |
Returns
Type | Description |
---|---|
Transport |
The transport metadata. |
Type Parameters
Name | Description |
---|---|
TContract | The contract type. |