Share via


MessageQueuePermissionAttribute.Label 속성

정의

큐 설명을 가져오거나 설정합니다.

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

속성 값

메시지 큐의 레이블입니다.

예외

값이 null인 경우

예제

다음 코드 예제를 가져오고 메시지 큐 사용 권한 특성의 값을 설정 Label 속성입니다.


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

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

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

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

적용 대상