MessageQueuePermissionEntry.MachineName Eigenschaft

Definition

Ruft den Namen des Computers ab, auf dem sich die Message Queuing-Warteschlange befindet.Gets the name of the computer where the Message Queuing queue is located.

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

Eigenschaftswert

Der Name des Computers, auf dem sich die Warteschlange befindet.The name of the computer where the queue is located.

Beispiele

Im folgenden Codebeispiel wird der Wert für die-Eigenschaft einer Eingabe Warteschlangen- MachineName Berechtigung angezeigt.The following code example displays the value of a message queue permission entry's MachineName property.

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

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

Gilt für: