MessageQueuePermissionAttribute.Path Özellik

Tanım

Kuyruğun yolunu alır veya ayarlar.

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

Özellik Değeri

tarafından MessageQueuebaşvuruda bulunan kuyruk.

Özel durumlar

Bu durumda değer null olur.

Örnekler

Aşağıdaki kod örneği, bir ileti kuyruğu izin özniteliğinin Path özelliğini alır ve ayarlar.


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

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

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

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

Şunlara uygulanır