MessageQueuePermissionAttribute.Category 속성

정의

큐 범주를 가져오거나 설정합니다.

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

속성 값

애플리케이션에서 큐를 분류할 수 있게 하는 큐 범주(메시지 큐 형식 식별자)입니다.

예외

값이 null인 경우

예제

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


// 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());

적용 대상