MessageQueuePermissionEntry Constructor (MessageQueuePermissionAccess, String, String, String)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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.

Namespace:   System.Messaging
Assembly:  System.Messaging (in System.Messaging.dll)

public MessageQueuePermissionEntry(
	MessageQueuePermissionAccess permissionAccess,
	string machineName,
	string label,
	string category
)

Parameters

permissionAccess
Type: System.Messaging.MessageQueuePermissionAccess

A bitwise combination of the MessageQueuePermissionAccess values. The PermissionAccess property is set to this value.

machineName
Type: System.String

The name of the computer where the Message Queuing queue is located. The MachineName property is set to this value.

label
Type: System.String

The queue description. The Label property is set to this value.

category
Type: System.String

The queue category (Message Queuing type identifier). The Category property is set to this value.

The following code example creates a new instance of MessageQueuePermissionEntry.

// 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());

.NET Framework
Available since 1.1
Return to top
Show: