Compartir a través de


MessageQueuePermissionAttribute.PermissionAccess Propiedad

Definición

Obtiene o establece los niveles de acceso a permisos utilizados en la solicitud de permisos.

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

Valor de propiedad

Combinación bit a bit de los valores de MessageQueuePermissionAccess.

Ejemplos

En el ejemplo de código siguiente se obtiene y se establece el valor de la propiedad del PermissionAccess atributo de permiso de cola de mensajes.


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

Se aplica a