MessageQueuePermissionAttribute.Category Propiedad

Definición

Obtiene o establece la categoría de la cola.

public:
 property System::String ^ Category { System::String ^ get(); void set(System::String ^ value); };
public string Category { get; set; }
member this.Category : string with get, set
Public Property Category As String

Valor de propiedad

Categoría de la cola (identificador de tipo de Message Queuing), que permite que una aplicación clasifique sus colas por categorías.

Excepciones

El valor es null.

Ejemplos

En el ejemplo de código siguiente se obtiene y establece el valor de la propiedad del atributo de Category 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 Category property value, based on the queue's
// Category property value.
attribute->Category = queue->Category.ToString();

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

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 Category property value, based on the queue's
// Category property value.
attribute.Category = queue.Category.ToString();

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

Se aplica a