Export (0) Print
Expand All

MessageQueue Methods

The MessageQueue type exposes the following members.

  Name Description
Public method BeginPeek() Initiates an asynchronous peek operation that has no time-out. The operation is not complete until a message becomes available in the queue.
Public method BeginPeek(TimeSpan) Initiates an asynchronous peek operation that has a specified time-out. The operation is not complete until either a message becomes available in the queue or the time-out occurs.
Public method BeginPeek(TimeSpan, Object) Initiates an asynchronous peek operation that has a specified time-out and a specified state object, which provides associated information throughout the operation's lifetime. The operation is not complete until either a message becomes available in the queue or the time-out occurs.
Public method BeginPeek(TimeSpan, Object, AsyncCallback) Initiates an asynchronous peek operation that has a specified time-out and a specified state object, which provides associated information throughout the operation's lifetime. This overload receives notification, through a callback, of the identity of the event handler for the operation. The operation is not complete until either a message becomes available in the queue or the time-out occurs.
Public method BeginPeek(TimeSpan, Cursor, PeekAction, Object, AsyncCallback) Initiates an asynchronous peek operation that has a specified time-out and that uses a specified cursor, a specified peek action, and a specified state object. The state object provides associated information throughout the lifetime of the operation. This overload receives notification, through a callback, of the identity of the event handler for the operation. The operation is not complete until either a message becomes available in the queue or the time-out occurs.
Public method BeginReceive() Initiates an asynchronous receive operation that has no time-out. The operation is not complete until a message becomes available in the queue.
Public method BeginReceive(TimeSpan) Initiates an asynchronous receive operation that has a specified time-out. The operation is not complete until either a message becomes available in the queue or the time-out occurs.
Public method BeginReceive(TimeSpan, Object) Initiates an asynchronous receive operation that has a specified time-out and a specified state object, which provides associated information throughout the operation's lifetime. The operation is not complete until either a message becomes available in the queue or the time-out occurs.
Public method BeginReceive(TimeSpan, Object, AsyncCallback) Initiates an asynchronous receive operation that has a specified time-out and a specified state object, which provides associated information throughout the operation's lifetime. This overload receives notification, through a callback, of the identity of the event handler for the operation. The operation is not complete until either a message becomes available in the queue or the time-out occurs.
Public method BeginReceive(TimeSpan, Cursor, Object, AsyncCallback) Initiates an asynchronous receive operation that has a specified time-out and uses a specified cursor and a specified state object. The state object provides associated information throughout the lifetime of the operation. This overload receives notification, through a callback, of the identity of the event handler for the operation. The operation is not complete until either a message becomes available in the queue or the time-out occurs.
Public method Static member ClearConnectionCache Clears the connection cache.
Public method Close Frees all resources allocated by the MessageQueue.
Public method Static member Create(String) Creates a non-transactional Message Queuing queue at the specified path.
Public method Static member Create(String, Boolean) Creates a transactional or non-transactional Message Queuing queue at the specified path.
Public method CreateCursor Creates a new Cursor for the current message queue.
Public method CreateObjRef Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.)
Public method Static member Delete Deletes a queue on a Message Queuing server.
Public method Dispose() Releases all resources used by the Component. (Inherited from Component.)
Protected method Dispose(Boolean) Disposes of the resources (other than memory) used by the MessageQueue. (Overrides Component.Dispose(Boolean).)
Public method EndPeek Completes the specified asynchronous peek operation.
Public method EndReceive Completes the specified asynchronous receive operation.
Public method Equals(Object) Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method Static member Exists Determines whether a Message Queuing queue exists at the specified path.
Protected method Finalize Releases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection. (Inherited from Component.)
Public method GetAllMessages Returns all the messages that are in the queue.
Public method GetEnumerator Obsolete. Enumerates the messages in a queue. GetEnumerator is deprecated. GetMessageEnumerator2 should be used instead.
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetLifetimeService Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Public method Static member GetMachineId Gets the identifier of the computer on which the queue referenced by this MessageQueue is located.
Public method GetMessageEnumerator Obsolete. Creates an enumerator object for all the messages in the queue. GetMessageEnumerator is deprecated. GetMessageEnumerator2 should be used instead.
Public method GetMessageEnumerator2 Creates an enumerator object for all the messages in the queue.
Public method Static member GetMessageQueueEnumerator() Provides forward-only cursor semantics to enumerate through all public queues on the network.
Public method Static member GetMessageQueueEnumerator(MessageQueueCriteria) Provides forward-only cursor semantics to enumerate through all public queues on the network that meet the specified criteria.
Public method Static member GetPrivateQueuesByMachine Retrieves all the private queues on the specified computer.
Public method Static member GetPublicQueues() Retrieves all the public queues on the network.
Public method Static member GetPublicQueues(MessageQueueCriteria) Retrieves all the public queues on the network that meet the specified criteria.
Public method Static member GetPublicQueuesByCategory Retrieves all the public queues on the network that belong to the specified category.
Public method Static member GetPublicQueuesByLabel Retrieves all the public queues on the network that carry the specified label.
Public method Static member GetPublicQueuesByMachine Retrieves all the public queues that reside on the specified computer.
Public method Static member GetSecurityContext Retrieves the security context that MSMQ associates with the current user (thread identity) at the time of this call.
Protected method GetService Returns an object that represents a service provided by the Component or by its Container. (Inherited from Component.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method InitializeLifetimeService Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Protected method MemberwiseClone() Creates a shallow copy of the current Object. (Inherited from Object.)
Protected method MemberwiseClone(Boolean) Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.)
Public method Peek() Returns without removing (peeks) the first message in the queue referenced by this MessageQueue. The Peek method is synchronous, so it blocks the current thread until a message becomes available.
Public method Peek(TimeSpan) Returns without removing (peeks) the first message in the queue referenced by this MessageQueue. The Peek method is synchronous, so it blocks the current thread until a message becomes available or the specified time-out occurs.
Public method Peek(TimeSpan, Cursor, PeekAction) Returns without removing (peeks) the current or next message in the queue, using the specified cursor. The Peek method is synchronous, so it blocks the current thread until a message becomes available or the specified time-out occurs.
Public method PeekByCorrelationId(String) Peeks the message that matches the given correlation identifier and immediately raises an exception if no message with the specified correlation identifier currently exists in the queue.
Public method PeekByCorrelationId(String, TimeSpan) Peeks the message that matches the given correlation identifier and waits until either a message with the specified correlation identifier is available in the queue, or the time-out expires.
Public method PeekById(String) Peeks the message whose message identifier matches the id parameter.
Public method PeekById(String, TimeSpan) Peeks the message whose message identifier matches the id parameter. Waits until the message appears in the queue or a time-out occurs.
Public method PeekByLookupId(Int64) Introduced in MSMQ 3.0. Peeks at the message that matches the given lookup identifier from a non-transactional queue.
Public method PeekByLookupId(MessageLookupAction, Int64) Introduced in MSMQ 3.0. Peeks at a specific message from the queue. The message can be specified by a lookup identifier or by its position at the front or end of the queue.
Public method Purge Deletes all the messages contained in the queue.
Public method Receive() Receives the first message available in the queue referenced by the MessageQueue. This call is synchronous, and blocks the current thread of execution until a message is available.
Public method Receive(MessageQueueTransaction) Receives the first message available in the transactional queue referenced by the MessageQueue. This call is synchronous, and blocks the current thread of execution until a message is available.
Public method Receive(MessageQueueTransactionType) Receives the first message available in the queue referenced by the MessageQueue. This call is synchronous, and blocks the current thread of execution until a message is available.
Public method Receive(TimeSpan) Receives the first message available in the queue referenced by the MessageQueue and waits until either a message is available in the queue, or the time-out expires.
Public method Receive(TimeSpan, Cursor) Receives the current message in the queue, using a specified cursor. If no message is available, this method waits until either a message is available, or the time-out expires.
Public method Receive(TimeSpan, MessageQueueTransaction) Receives the first message available in the transactional queue referenced by the MessageQueue and waits until either a message is available in the queue, or the time-out expires.
Public method Receive(TimeSpan, MessageQueueTransactionType) Receives the first message available in the queue referenced by the MessageQueue. This call is synchronous, and waits until either a message is available in the queue, or the time-out expires.
Public method Receive(TimeSpan, Cursor, MessageQueueTransaction) Receives the current message in the queue, using a specified cursor. If no message is available, this method waits until either a message is available, or the time-out expires.
Public method Receive(TimeSpan, Cursor, MessageQueueTransactionType) Receives the current message in the queue, using a specified cursor. If no message is available, this method waits until either a message is available, or the time-out expires.
Public method ReceiveByCorrelationId(String) Receives the message that matches the given correlation identifier (from a non-transactional queue) and immediately raises an exception if no message with the specified correlation identifier currently exists in the queue.
Public method ReceiveByCorrelationId(String, MessageQueueTransaction) Receives the message that matches the given correlation identifier (from a transactional queue) and immediately raises an exception if no message with the specified correlation identifier currently exists in the queue.
Public method ReceiveByCorrelationId(String, MessageQueueTransactionType) Receives the message that matches the given correlation identifier and immediately raises an exception if no message with the specified correlation identifier currently exists in the queue.
Public method ReceiveByCorrelationId(String, TimeSpan) Receives the message that matches the given correlation identifier (from a non-transactional queue) and waits until either a message with the specified correlation identifier is available in the queue, or the time-out expires.
Public method ReceiveByCorrelationId(String, TimeSpan, MessageQueueTransaction) Receives the message that matches the given correlation identifier (from a transactional queue) and waits until either a message with the specified correlation identifier is available in the queue, or the time-out expires.
Public method ReceiveByCorrelationId(String, TimeSpan, MessageQueueTransactionType) Receives the message that matches the given correlation identifier and waits until either a message with the specified correlation identifier is available in the queue, or the time-out expires.
Public method ReceiveById(String) Receives the message that matches the given identifier from a non-transactional queue and immediately raises an exception if no message with the specified identifier currently exists in the queue.
Public method ReceiveById(String, MessageQueueTransaction) Receives the message that matches the given identifier (from a transactional queue) and immediately raises an exception if no message with the specified identifier currently exists in the queue.
Public method ReceiveById(String, MessageQueueTransactionType) Receives the message that matches the given identifier and immediately raises an exception if no message with the specified identifier currently exists in the queue.
Public method ReceiveById(String, TimeSpan) Receives the message that matches the given identifier (from a non-transactional queue) and waits until either a message with the specified identifier is available in the queue or the time-out expires.
Public method ReceiveById(String, TimeSpan, MessageQueueTransaction) Receives the message that matches the given identifier (from a transactional queue) and waits until either a message with the specified identifier is available in the queue or the time-out expires.
Public method ReceiveById(String, TimeSpan, MessageQueueTransactionType) Receives the message that matches the given identifier and waits until either a message with the specified identifier is available in the queue or the time-out expires.
Public method ReceiveByLookupId(Int64) Introduced in MSMQ 3.0. Receives the message that matches the given lookup identifier from a non-transactional queue.
Public method ReceiveByLookupId(MessageLookupAction, Int64, MessageQueueTransaction) Introduced in MSMQ 3.0. Receives a specific message from a transactional queue. The message can be specified by a lookup identifier or by its position at the front or end of the queue.
Public method ReceiveByLookupId(MessageLookupAction, Int64, MessageQueueTransactionType) Introduced in MSMQ 3.0. Receives a specific message from the queue, using the specified transaction context. The message can be specified by a lookup identifier or by its position at the front or end of the queue.
Public method Refresh Refreshes the properties presented by the MessageQueue to reflect the current state of the resource.
Public method ResetPermissions Resets the permission list to the operating system's default values. Removes any queue permissions you have appended to the default list.
Public method Send(Object) Sends an object to non-transactional queue referenced by this MessageQueue.
Public method Send(Object, MessageQueueTransaction) Sends an object to the transactional queue referenced by this MessageQueue.
Public method Send(Object, MessageQueueTransactionType) Sends an object to the queue referenced by this MessageQueue.
Public method Send(Object, String) Sends an object to the non-transactional queue referenced by this MessageQueue and specifies a label for the message.
Public method Send(Object, String, MessageQueueTransaction) Sends an object to the transactional queue referenced by this MessageQueue and specifies a label for the message.
Public method Send(Object, String, MessageQueueTransactionType) Sends an object to the queue referenced by this MessageQueue and specifies a label for the message.
Public method SetPermissions(AccessControlList) Assigns access rights to the queue based on the contents of an access control list.
Public method SetPermissions(MessageQueueAccessControlEntry) Assigns access rights to the queue based on the contents of an access control entry.
Public method SetPermissions(String, MessageQueueAccessRights) Gives a computer, group, or user the specified access rights.
Public method SetPermissions(String, MessageQueueAccessRights, AccessControlEntryType) Gives a computer, group, or user the specified access rights, with the specified access control type (allow, deny, revoke, or set).
Public method ToString Returns a String containing the name of the Component, if any. This method should not be overridden. (Inherited from Component.)
Top

  Name Description
Public Extension Method AsParallel Enables parallelization of a query. (Defined by ParallelEnumerable.)
Public Extension Method AsQueryable Converts an IEnumerable to an IQueryable. (Defined by Queryable.)
Public Extension Method Cast<TResult> Casts the elements of an IEnumerable to the specified type. (Defined by Enumerable.)
Public Extension Method OfType<TResult> Filters the elements of an IEnumerable based on a specified type. (Defined by Enumerable.)
Top
Show:
© 2014 Microsoft