MessageQueuePermissionAttribute.PermissionAccess プロパティ

定義

アクセス許可要求に使用するアクセス許可のアクセス レベルを取得または設定します。

public:
 property System::Messaging::MessageQueuePermissionAccess PermissionAccess { System::Messaging::MessageQueuePermissionAccess get(); void set(System::Messaging::MessageQueuePermissionAccess value); };
public System.Messaging.MessageQueuePermissionAccess PermissionAccess { get; set; }
member this.PermissionAccess : System.Messaging.MessageQueuePermissionAccess with get, set
Public Property PermissionAccess As MessageQueuePermissionAccess

プロパティ値

MessageQueuePermissionAccess 値のビットごとの組み合わせ。

次のコード例では、メッセージ キューのアクセス許可属性 PermissionAccess の プロパティの値を取得および設定します。


// Connect to a queue on the local computer.
MessageQueue^ queue = gcnew MessageQueue(".\\exampleQueue");

// Create a new instance of MessageQueuePermissionAttribute.
MessageQueuePermissionAttribute^ attribute =
    gcnew MessageQueuePermissionAttribute(
    System::Security::Permissions::SecurityAction::Assert);

// Set the attribute's PermissionAccess property value.
attribute->PermissionAccess = MessageQueuePermissionAccess::Receive;

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

queue->Close();

// Connect to a queue on the local computer.
MessageQueue queue = new MessageQueue(".\\exampleQueue");

// Create a new instance of MessageQueuePermissionAttribute.
MessageQueuePermissionAttribute attribute =
    new MessageQueuePermissionAttribute(
    System.Security.Permissions.SecurityAction.Assert);

// Set the attribute's PermissionAccess property value.
attribute.PermissionAccess = MessageQueuePermissionAccess.Receive;

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

適用対象