MessageQueuePermissionAttribute.PermissionAccess Property
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.
Gets or sets the permission access levels used in the permissions request.
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
Property Value
A bitwise combination of the MessageQueuePermissionAccess values.
Examples
The following code example gets and sets the value of a message queue permission attribute's PermissionAccess property.
// 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);
Applies to
Bekerjasama dengan kami di GitHub
Sumber untuk kandungan ini boleh didapati di GitHub, di mana anda juga boleh mencipta dan menyemak isu dan menarik permintaan. Untuk maklumat lanjut, lihat panduan penyumbang kami.