MessageQueuePermissionEntry Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the MessageQueuePermissionEntry class.
Overloads
MessageQueuePermissionEntry(MessageQueuePermissionAccess, String) |
Initializes a new instance of the MessageQueuePermissionEntry class with the specified permission access levels and the path of the queue. |
MessageQueuePermissionEntry(MessageQueuePermissionAccess, String, String, String) |
Initializes a new instance of the MessageQueuePermissionEntry class with the specified permission access levels, the name of the computer where the queue is located, the queue description, and the queue category. |
MessageQueuePermissionEntry(MessageQueuePermissionAccess, String)
Initializes a new instance of the MessageQueuePermissionEntry class with the specified permission access levels and the path of the queue.
public:
MessageQueuePermissionEntry(System::Messaging::MessageQueuePermissionAccess permissionAccess, System::String ^ path);
public MessageQueuePermissionEntry (System.Messaging.MessageQueuePermissionAccess permissionAccess, string path);
new System.Messaging.MessageQueuePermissionEntry : System.Messaging.MessageQueuePermissionAccess * string -> System.Messaging.MessageQueuePermissionEntry
Public Sub New (permissionAccess As MessageQueuePermissionAccess, path As String)
Parameters
- permissionAccess
- MessageQueuePermissionAccess
A bitwise combination of the MessageQueuePermissionAccess values. The PermissionAccess property is set to this value.
- path
- String
The path of the queue that is referenced by the MessageQueue object. The Path property is set to this value.
Examples
The following code example creates a new instance of MessageQueuePermissionEntry.
// Connect to a queue on the local computer.
MessageQueue^ queue = gcnew MessageQueue(".\\exampleQueue");
// Create a new instance of MessageQueuePermissionEntry.
MessageQueuePermissionEntry^ entry = gcnew MessageQueuePermissionEntry(
MessageQueuePermissionAccess::Receive,
queue->Path);
queue->Close();
// Connect to a queue on the local computer.
MessageQueue queue = new MessageQueue(".\\exampleQueue");
// Create a new instance of MessageQueuePermissionEntry.
MessageQueuePermissionEntry entry = new MessageQueuePermissionEntry(
MessageQueuePermissionAccess.Receive,
queue.Path);
Applies to
MessageQueuePermissionEntry(MessageQueuePermissionAccess, String, String, String)
Initializes a new instance of the MessageQueuePermissionEntry class with the specified permission access levels, the name of the computer where the queue is located, the queue description, and the queue category.
public:
MessageQueuePermissionEntry(System::Messaging::MessageQueuePermissionAccess permissionAccess, System::String ^ machineName, System::String ^ label, System::String ^ category);
public MessageQueuePermissionEntry (System.Messaging.MessageQueuePermissionAccess permissionAccess, string machineName, string label, string category);
new System.Messaging.MessageQueuePermissionEntry : System.Messaging.MessageQueuePermissionAccess * string * string * string -> System.Messaging.MessageQueuePermissionEntry
Public Sub New (permissionAccess As MessageQueuePermissionAccess, machineName As String, label As String, category As String)
Parameters
- permissionAccess
- MessageQueuePermissionAccess
A bitwise combination of the MessageQueuePermissionAccess values. The PermissionAccess property is set to this value.
- machineName
- String
The name of the computer where the Message Queuing queue is located. The MachineName property is set to this value.
- category
- String
The queue category (Message Queuing type identifier). The Category property is set to this value.
Examples
The following code example creates a new instance of MessageQueuePermissionEntry.
// Connect to a queue on the local computer.
MessageQueue^ queue = gcnew MessageQueue(".\\exampleQueue");
// Create a new instance of MessageQueuePermissionEntry.
MessageQueuePermissionEntry^ entry = gcnew MessageQueuePermissionEntry(
MessageQueuePermissionAccess::Receive,
queue->MachineName,
queue->Label,
queue->Category.ToString());
queue->Close();
// Connect to a queue on the local computer.
MessageQueue queue = new MessageQueue(".\\exampleQueue");
// Create a new instance of MessageQueuePermissionEntry.
MessageQueuePermissionEntry entry = new MessageQueuePermissionEntry(
MessageQueuePermissionAccess.Receive,
queue.MachineName,
queue.Label,
queue.Category.ToString());