ערוך

שתף באמצעות


AnnouncementClient Class

Definition

Used by services to send discovery announcement messages. Clients can use the discovery mechanism, specifically the corresponding AnnouncementService class to listen and act on the announcement messages. An announcement message contains information about the service such as its fully-qualified contract name, any scopes that the service is operating in as well as any custom metadata the service wants to send.

public ref class AnnouncementClient sealed : IDisposable, System::ServiceModel::ICommunicationObject
public sealed class AnnouncementClient : IDisposable, System.ServiceModel.ICommunicationObject
type AnnouncementClient = class
    interface ICommunicationObject
    interface IDisposable
Public NotInheritable Class AnnouncementClient
Implements ICommunicationObject, IDisposable
Inheritance
AnnouncementClient
Implements

Remarks

If a service adds the ServiceDiscoveryBehavior behavior and specifies an AnnouncementEndpoint the service automatically sends announcement messages when the service goes online or comes offline. Use this class when you want to explicitly send the announcement messages yourself.

Constructors

AnnouncementClient()

Creates a new instance of the AnnouncementClient class.

AnnouncementClient(AnnouncementEndpoint)

Initializes a new instance of the AnnouncementClient class with the specified AnnouncementEndpoint.

AnnouncementClient(String)

Initializes a new instance of the AnnouncementClient class with the specified endpoint configuration.

Properties

ChannelFactory

Gets the channel factory associated with the AnnouncementClient.

ClientCredentials

Gets the client credentials associated with the AnnouncementClient.

Endpoint

Gets the ServiceEndpoint associated with the AnnouncementClient.

InnerChannel

Gets the inner channel associated with the AnnouncementClient.

MessageSequenceGenerator

Gets or sets the message sequence generator associated with the AnnouncementClient.

Methods

AnnounceOffline(EndpointDiscoveryMetadata)

Causes an offline announcement message (Bye) to be sent with the specified endpoint discovery metadata.

AnnounceOfflineAsync(EndpointDiscoveryMetadata, Object)

Causes an offline announcement message (Bye) to be sent asynchronously with the specified endpoint discovery metadata and user-defined state.

AnnounceOfflineAsync(EndpointDiscoveryMetadata)

Causes an offline announcement message (Bye) to be sent asynchronously with the specified endpoint discovery metadata.

AnnounceOfflineTaskAsync(EndpointDiscoveryMetadata)

Causes an offline task announcement message (Bye) to be sent asynchronously with the specified endpoint discovery metadata.

AnnounceOnline(EndpointDiscoveryMetadata)

Causes an online announcement message (Hello) to be sent.

AnnounceOnlineAsync(EndpointDiscoveryMetadata, Object)

Causes an online announcement (Hello) message to be sent asynchronously with the specified endpoint discovery metadata and user-defined state.

AnnounceOnlineAsync(EndpointDiscoveryMetadata)

Causes an online announcement (Hello) message to be sent asynchronously with the specified endpoint discovery metadata.

AnnounceOnlineTaskAsync(EndpointDiscoveryMetadata)

Causes an online task announcement message (Hello) to be sent asynchronously with the specified endpoint discovery metadata.

BeginAnnounceOffline(EndpointDiscoveryMetadata, AsyncCallback, Object)

Causes an offline announcement (Bye) message to be sent asynchronously with the specified endpoint discovery metadata and user-defined state. The specified AsyncCallback is called when the operation completes.

BeginAnnounceOnline(EndpointDiscoveryMetadata, AsyncCallback, Object)

Causes an online announcement (Hello) message to be sent asynchronously with the specified endpoint discovery metadata and user-defined state. The specified AsyncCallback is called when the operation completes.

Close()

Closes the AnnouncementClient.

EndAnnounceOffline(IAsyncResult)

Waits for a pending asynchronous offline announcement to complete.

EndAnnounceOnline(IAsyncResult)

Waits for a pending asynchronous online announcement to complete.

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
Open()

Opens the AnnouncementClient.

ToString()

Returns a string that represents the current object.

(Inherited from Object)

Events

AnnounceOfflineCompleted

Occurs when an asynchronous offline announcement (Bye) completes.

AnnounceOnlineCompleted

Occurs when an asynchronous online announcement (Hello) completes.

Explicit Interface Implementations

ICommunicationObject.Abort()

Causes a communication object to transition immediately from its current state into the closed state.

ICommunicationObject.BeginClose(AsyncCallback, Object)

Begins an asynchronous operation to close a communication object.

ICommunicationObject.BeginClose(TimeSpan, AsyncCallback, Object)

Begins an asynchronous operation to close a communication object with a specified timeout.

ICommunicationObject.BeginOpen(AsyncCallback, Object)

Begins an asynchronous operation to open a communication object.

ICommunicationObject.BeginOpen(TimeSpan, AsyncCallback, Object)

Begins an asynchronous operation to open a communication object within a specified interval of time.

ICommunicationObject.Close()

Causes a communication object to transition from its current state into the closed state.

ICommunicationObject.Close(TimeSpan)

Causes a communication object to transition from its current state into the closed state within a specified interval of time.

ICommunicationObject.Closed

Occurs when the communication object completes its transition from the closing state into the closed state.

ICommunicationObject.Closing

Occurs when the communication object first enters the closing state.

ICommunicationObject.EndClose(IAsyncResult)

Completes an asynchronous operation to close a communication object.

ICommunicationObject.EndOpen(IAsyncResult)

Completes an asynchronous operation to open a communication object.

ICommunicationObject.Faulted

Occurs when the communication object first enters the faulted state.

ICommunicationObject.Open()

Causes a communication object to transition from the created state into the opened state.

ICommunicationObject.Open(TimeSpan)

Causes a communication object to transition from the created state into the opened state within a specified interval of time.

ICommunicationObject.Opened

Occurs when the communication object completes its transition from the opening state into the opened state.

ICommunicationObject.Opening

Occurs when the communication object first enters the opening state.

ICommunicationObject.State

Gets the current state of the communication-oriented object.

IDisposable.Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Applies to