Var denne siden nyttig?
Din tilbakemelding på dette innholdet er viktig. Fortell oss hva du synes.
Mer tilbakemelding?
1500 tegn igjen
Eksporter (0) Skriv ut
Vis alt
EN
Dette innholdet er ikke tilgjengelig på ditt språk, men her er den engelske versjonen.

TopicClient Class

An anchor class used to access a Topic to perform run-time operations.

Namespace:  Microsoft.ServiceBus.Messaging
Assembly:  Microsoft.ServiceBus (in Microsoft.ServiceBus.dll)

public abstract class TopicClient : MessageClientEntity

The TopicClient type exposes the following members.

  NameDescription
Public propertyIsClosed (Inherited from ClientEntity.)
Protected propertyIsSubQueueGets or sets a value that indicates whether the message receiver is created from a subqueue.
Public propertyMessagingFactoryGets or sets the messaging factory that was used in creating this TopicClient object.
Public propertyPathGets or sets the full pathname of the file.
Public propertyRetryPolicy (Inherited from ClientEntity.)
Protected propertyThisLock (Inherited from ClientEntity.)
Top

  NameDescription
Public methodAbortPerforms abort functionality on the messaging entity. (Inherited from ClientEntity.)
Public methodBeginCloseBegins an asynchronous operation to close the message client entity. (Inherited from MessageClientEntity.)
Public methodBeginSendBegins an asynchronous operation to send a message.
Public methodBeginSendBatchBegins an asynchronous operation to send a message by batch.
Public methodCloseSends a cleanup message to Service Bus to signal the completion of the usage of an entity. (Inherited from ClientEntity.)
Public methodCloseAsyncSends a cleanup message asynchronously to Service Bus to signal the completion of the usage of an entity. (Inherited from ClientEntity.)
Public methodStatic memberCreateCreates a new instance of TopicClient.
Public methodStatic memberCreateFromConnectionString(String)Creates a new instance of TopicClient using the specified connection string.
Public methodStatic memberCreateFromConnectionString(String, String)Creates a new instance of TopicClient using the specified connection string and path to the topic. Use this overload only when the connection string does not use the EntityPath property.
Public methodEndCloseFinishes an asynchronous operation to close the message client entity. (Inherited from MessageClientEntity.)
Public methodEndSendFinishes an asynchronous operation to send a message.
Public methodEndSendBatchFinishes an asynchronous operation to send a message.
Public methodEquals (Inherited from Object.)
Protected methodFaultFor internal use only. Do not inherit from this class. (Inherited from ClientEntity.)
Protected methodFinalize (Inherited from Object.)
Public methodStatic memberFormatTransferDeadLetterPathA utility method that, given the topic path and subscription name, forms a full path that points to the dead letter queue of the topic's transfer topic.
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Protected methodOnAbortExecutes the abort action. (Overrides ClientEntity.OnAbort().)
Protected methodOnBeginCloseExecutes the begin close action. (Overrides ClientEntity.OnBeginClose(TimeSpan, AsyncCallback, Object).)
Protected methodOnBeginCreateSenderExecutes the begin create sender action.
Protected methodOnBeginOpen (Inherited from ClientEntity.)
Protected methodOnCloseExecutes the close action. (Overrides ClientEntity.OnClose(TimeSpan).)
Protected methodOnClosed (Inherited from ClientEntity.)
Protected methodOnEndCloseExecutes the end close action. (Overrides ClientEntity.OnEndClose(IAsyncResult).)
Protected methodOnEndCreateSenderExecutes the end create sender action.
Protected methodOnEndOpen (Inherited from ClientEntity.)
Protected methodOnFaulted (Inherited from ClientEntity.)
Protected methodOnOpen (Inherited from ClientEntity.)
Protected methodOnOpened (Inherited from ClientEntity.)
Public methodSendSends a message using the InternalSender.
Public methodSendAsyncAsynchronously sends a message using the InternalSender.
Public methodSendBatchSends a set of brokered messages (for batch processing).
Public methodSendBatchAsyncAsynchronously sends a set of brokered messages (for batch processing).
Protected methodThrowIfClosed (Inherited from ClientEntity.)
Protected methodThrowIfDisposed (Inherited from ClientEntity.)
Protected methodThrowIfDisposedOrImmutable (Inherited from ClientEntity.)
Protected methodThrowIfDisposedOrNotOpen (Inherited from ClientEntity.)
Protected methodThrowIfFaulted (Inherited from ClientEntity.)
Public methodToString (Inherited from Object.)
Top

This abstract class is not meant to be inherited, so protected members of this class should be ignored.

// Create the MessagingFactory
MessagingFactory factory = 
MessagingFactory.Create(myServiceBusNamespaceUri, SharedSecretTokenProvider.CreateSharedSecretTokenProvider(issuerName, issuerKey));

//********************************************************************************
//                          Sending messages to a Topic
//********************************************************************************

// Create topic client
TopicClient myTopicClient = factory.CreateTopicClient(myTopic);

// Send messages
List <object> Issues = new List <object>();
foreach (var issue in Issues)
{
   myTopicClient.Send(new BrokeredMessage(issue));
}

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

Fellesskapsinnhold

Legg til
Vis:
© 2015 Microsoft