Udostępnij za pośrednictwem


MessageQueuePermissionEntry.Category Właściwość

Definicja

Pobiera kategorię kolejki.

public:
 property System::String ^ Category { System::String ^ get(); };
public string Category { get; }
member this.Category : string
Public ReadOnly Property Category As String

Wartość właściwości

Kategoria kolejki (identyfikator typu kolejkowania komunikatów), która umożliwia aplikacji kategoryzowanie kolejek.

Przykłady

Poniższy przykład kodu przedstawia wartość właściwości wpisu uprawnień Category kolejki komunikatów.

// 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 Category property.
Console::WriteLine("Category: {0}", entry->Category->ToString());

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 Category property.
Console.WriteLine("Category: {0}", entry.Category.ToString());

Dotyczy