Export (0) Print
Expand All

AnnouncementClient Class

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.

System.Object
  System.ServiceModel.Discovery.AnnouncementClient

Namespace:  System.ServiceModel.Discovery
Assembly:  System.ServiceModel.Discovery (in System.ServiceModel.Discovery.dll)

public sealed class AnnouncementClient : ICommunicationObject, 
	IDisposable

The AnnouncementClient type exposes the following members.

  NameDescription
Public methodAnnouncementClient()Creates a new instance of the AnnouncementClient class.
Public methodAnnouncementClient(AnnouncementEndpoint)Initializes a new instance of the AnnouncementClient class with the specified AnnouncementEndpoint.
Public methodAnnouncementClient(String)Initializes a new instance of the AnnouncementClient class with the specified endpoint configuration.
Top

  NameDescription
Public propertyChannelFactoryGets the channel factory associated with the AnnouncementClient.
Public propertyClientCredentialsGets the client credentials associated with the AnnouncementClient.
Public propertyEndpointGets the ServiceEndpoint associated with the AnnouncementClient.
Public propertyInnerChannelGets the inner channel associated with the AnnouncementClient.
Public propertyMessageSequenceGeneratorGets or sets the message sequence generator associated with the AnnouncementClient.
Top

  NameDescription
Public methodAnnounceOfflineCauses an offline announcement message (Bye) to be sent with the specified endpoint discovery metadata.
Public methodAnnounceOfflineAsync(EndpointDiscoveryMetadata)Causes an offline announcement message (Bye) to be sent asynchronously with the specified endpoint discovery metadata.
Public methodAnnounceOfflineAsync(EndpointDiscoveryMetadata, Object)Causes an offline announcement message (Bye) to be sent asynchronously with the specified endpoint discovery metadata and user-defined state.
Public methodAnnounceOnlineCauses an online announcement message (Hello) to be sent asynchronously.
Public methodAnnounceOnlineAsync(EndpointDiscoveryMetadata)Causes an online announcement (Hello) message to be sent asynchronously with the specified endpoint discovery metadata.
Public methodAnnounceOnlineAsync(EndpointDiscoveryMetadata, Object)Causes an online announcement (Hello) message to be sent asynchronously with the specified endpoint discovery metadata and user-defined state.
Public methodBeginAnnounceOfflineCauses 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.
Public methodBeginAnnounceOnlineCauses 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.
Public methodCloseCloses the AnnouncementClient.
Public methodEndAnnounceOfflineWaits for a pending asynchronous offline announcement to complete.
Public methodEndAnnounceOnlineWaits for a pending asynchronous online announcement to complete.
Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodOpenOpens the AnnouncementClient.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

  NameDescription
Public eventAnnounceOfflineCompletedOccurs when an asynchronous offline announcement (Bye) completes.
Public eventAnnounceOnlineCompletedOccurs when an asynchronous online announcement (Hello) completes.
Top

  NameDescription
Explicit interface implemetationPrivate methodICommunicationObject.AbortCauses a communication object to transition immediately from its current state into the closed state.
Explicit interface implemetationPrivate methodICommunicationObject.BeginClose(AsyncCallback, Object)Begins an asynchronous operation to close a communication object.
Explicit interface implemetationPrivate methodICommunicationObject.BeginClose(TimeSpan, AsyncCallback, Object)Begins an asynchronous operation to close a communication object with a specified timeout.
Explicit interface implemetationPrivate methodICommunicationObject.BeginOpen(AsyncCallback, Object)Begins an asynchronous operation to open a communication object.
Explicit interface implemetationPrivate methodICommunicationObject.BeginOpen(TimeSpan, AsyncCallback, Object)Begins an asynchronous operation to open a communication object within a specified interval of time.
Explicit interface implemetationPrivate methodICommunicationObject.Close()Causes a communication object to transition from its current state into the closed state.
Explicit interface implemetationPrivate methodICommunicationObject.Close(TimeSpan)Causes a communication object to transition from its current state into the closed state.
Explicit interface implemetationPrivate eventICommunicationObject.ClosedOccurs when the communication object completes its transition from the closing state into the closed state.
Explicit interface implemetationPrivate eventICommunicationObject.ClosingOccurs when the communication object first enters the closing state.
Explicit interface implemetationPrivate methodICommunicationObject.EndCloseCompletes an asynchronous operation to close a communication object.
Explicit interface implemetationPrivate methodICommunicationObject.EndOpenCompletes an asynchronous operation to open a communication object.
Explicit interface implemetationPrivate eventICommunicationObject.FaultedOccurs when the communication object first enters the faulted state.
Explicit interface implemetationPrivate methodICommunicationObject.Open()Causes a communication object to transition from the created state into the opened state.
Explicit interface implemetationPrivate methodICommunicationObject.Open(TimeSpan)Causes a communication object to transition from the created state into the opened state within a specified interval of time.
Explicit interface implemetationPrivate eventICommunicationObject.OpenedOccurs when the communication object completes its transition from the opening state into the opened state.
Explicit interface implemetationPrivate eventICommunicationObject.OpeningOccurs when the communication object first enters the opening state.
Explicit interface implemetationPrivate propertyICommunicationObject.StateGets the current state of the communication-oriented object.
Explicit interface implemetationPrivate methodIDisposable.DisposePerforms application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Top

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.

.NET Framework

Supported in: 4

.NET Framework Client Profile

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Community Additions

ADD
Show:
© 2014 Microsoft