MessageQueuePermissionEntry.PermissionAccess 属性

定义

获取在权限请求中使用的权限访问级别。

public:
 property System::Messaging::MessageQueuePermissionAccess PermissionAccess { System::Messaging::MessageQueuePermissionAccess get(); };
public System.Messaging.MessageQueuePermissionAccess PermissionAccess { get; }
member this.PermissionAccess : System.Messaging.MessageQueuePermissionAccess
Public ReadOnly Property PermissionAccess As MessageQueuePermissionAccess

属性值

MessageQueuePermissionAccess 值的按位组合。

示例

下面的代码示例显示消息队列权限条目的 PermissionAccess 属性的值。

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

       // Display the value of the entry's PermissionAccess property.
       Console::WriteLine("PermissionAccess: {0}", entry->PermissionAccess);

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

// Display the value of the entry's PermissionAccess property.
Console.WriteLine("PermissionAccess: {0}", entry.PermissionAccess);

适用于