Export (0) Print
Expand All

MessageQueue Methods

The methods of the MessageQueue class are listed here. For a complete list of MessageQueue class members, see the MessageQueue Members topic.

Public Methods

public methodBeginPeek Overloaded. Initiates an asynchronous peek operation by telling Message Queuing to begin peeking a message and notify the event handler when finished.
public methodBeginReceive Overloaded. Initiates an asynchronous receive operation by telling Message Queuing to begin receiving a message and notify the event handler when finished.
public methodstatic (Shared in Visual Basic)ClearConnectionCache Clears the connection cache.
public methodClose Frees all resources allocated by the MessageQueue.
public methodstatic (Shared in Visual Basic)Create Overloaded. Creates a new queue at the specified path on a Message Queuing server.
public methodCreateObjRef (inherited from MarshalByRefObject) Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
public methodstatic (Shared in Visual Basic)Delete Deletes a queue on a Message Queuing server.
public methodDispose (inherited from Component) Overloaded. Releases the resources used by the Component.
public methodEndPeek Completes the specified asynchronous peek operation.
public methodEndReceive Completes the specified asynchronous receive operation.
public methodEquals (inherited from Object) Overloaded. Determines whether two Object instances are equal.
public methodstatic (Shared in Visual Basic)Exists Determines whether a Message Queuing queue at the specified path exists.
public methodGetAllMessages Returns all the messages that are in the queue.
public methodGetEnumerator Enumerates the messages in a queue.
public methodGetHashCode (inherited from Object) Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
public methodGetLifetimeService (inherited from MarshalByRefObject) Retrieves the current lifetime service object that controls the lifetime policy for this instance.
public methodstatic (Shared in Visual Basic)GetMachineId Gets the identifier of the computer on which the queue referenced by this MessageQueue is located.
public methodGetMessageEnumerator Creates an enumerator object for all the messages in the queue.
public methodstatic (Shared in Visual Basic)GetMessageQueueEnumerator Overloaded. Creates an enumerator object for a dynamic listing of the public queues on the network.
public methodstatic (Shared in Visual Basic)GetPrivateQueuesByMachine Retrieves all the private queues on the specified computer.
public methodstatic (Shared in Visual Basic)GetPublicQueues Overloaded. Retrieves all the public queues on the network.
public methodstatic (Shared in Visual Basic)GetPublicQueuesByCategory Retrieves all the public queues on the network that belong to the specified category.
public methodstatic (Shared in Visual Basic)GetPublicQueuesByLabel Retrieves all the public queues on the network that carry the specified label.
public methodstatic (Shared in Visual Basic)GetPublicQueuesByMachine Retrieves all the public queues that reside on the specified computer.
public methodGetType (inherited from Object) Gets the Type of the current instance.
public methodInitializeLifetimeService (inherited from MarshalByRefObject) Obtains a lifetime service object to control the lifetime policy for this instance.
public methodPeek Overloaded. Returns a copy of the first message in the queue, without removing the message from the queue.
public methodPeekByCorrelationId Overloaded. Peeks a message that matches a given correlation identifier.
public methodPeekById Overloaded. Returns a copy of the message that has the specified message identifier, without removing the message from the queue.
public methodPurge Deletes all the messages contained in the queue.
public methodReceive Overloaded. Receives the first message in the queue, removing it from the queue.
public methodReceiveByCorrelationId Overloaded. Receives a message that matches a given correlation identifier.
public methodReceiveById Overloaded. Receives the message that matches the given identifier, removing it from the queue.
public methodRefresh Refreshes the properties presented by the MessageQueue to reflect the current state of the resource.
public methodResetPermissions Resets the permission list to the operating system's default values. Removes any queue permissions you have appended to the default list.
public methodSend Overloaded. Sends an object to a queue.
public methodSetPermissions Overloaded. Adds permissions to the current set. This controls who has access rights to queue properties and messages in the queue.
public methodToString (inherited from Object) Returns a String that represents the current Object.

Protected Methods

protected methodDispose Overloaded. Overridden. See Component.Dispose.
protected methodFinalize (inherited from Component) Overridden. Releases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection.

In C# and C++, finalizers are expressed using destructor syntax.

protected methodGetService (inherited from Component) Returns an object that represents a service provided by the Component or by its Container.
protected methodMemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.

See Also

MessageQueue Class | System.Messaging Namespace

Show:
© 2014 Microsoft