Show / Hide Table of Contents

    Class DiscoveryClient

    Provides the abstract class for the capability for discovering services.

    Inheritance
    System.Object
    DiscoveryClient
    Namespace: Copper.Discovery.Common
    Assembly: Copper.Discovery.Common.dll
    Syntax
    public class DiscoveryClient

    Constructors

    View Source

    DiscoveryClient(IRequestReceiver, IEventPublisher, IServiceDiscoveryMetadataProvider)

    Initializes a new instance of the DiscoveryClient class.

    Declaration
    public DiscoveryClient(IRequestReceiver requestReceiver, IEventPublisher eventPublisher, IServiceDiscoveryMetadataProvider serviceDiscoveryMetadataProvider)
    Parameters
    Type Name Description
    IRequestReceiver requestReceiver

    The request receiver.

    IEventPublisher eventPublisher

    The event publisher.

    IServiceDiscoveryMetadataProvider serviceDiscoveryMetadataProvider

    The service discovery metadata provider.

    Methods

    View Source

    Discover(TimeSpan)

    Attempts to discover services until the timeout has expired.

    Declaration
    public Task<ServiceDiscoveryResponse[]> Discover(TimeSpan timeout)
    Parameters
    Type Name Description
    System.TimeSpan timeout

    The timeout.

    Returns
    Type Description
    System.Threading.Tasks.Task<ServiceDiscoveryResponse[]>

    A System.Threading.Tasks.Task that represents outstanding operation. The result of the System.Threading.Tasks.Task is an array of ServiceDiscoveryResponse.

    View Source

    Discover(TimeSpan, ServiceDiscoveryCriteria, Int32)

    Attempts to discover services matching the provided ServiceDiscoveryCriteria until the timeout has expired or the expected response count has been reached.

    Declaration
    public async Task<ServiceDiscoveryResponse> Discover(TimeSpan timeout, ServiceDiscoveryCriteria serviceDiscoveryCriteria, int expectedResponseCount)
    Parameters
    Type Name Description
    System.TimeSpan timeout

    The timeout.

    ServiceDiscoveryCriteria serviceDiscoveryCriteria

    The service discovery criteria.

    System.Int32 expectedResponseCount

    The expected response count.

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

    A System.Threading.Tasks.Task that represents outstanding operation. The result of the System.Threading.Tasks.Task is an array of ServiceDiscoveryResponse.

    • View Source
    Back to top Generated by DocFX