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
Значение свойства
Категория очереди (идентификатор типа для Message Queuing), которая позволяет приложению разделить очереди на категории.
Исключения
Значение — 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());
Применяется к
GitHub сайтында бізбен бірлесіп жұмыс істеу
Бұл мазмұнның көзін GitHub сайтында табуға болады. Онда сонымен бірге мәселелер мен өзгертулерді енгізу сұрауларын жасауға және қарап шығуға болады. Қосымша ақпарат алу үшін қатысушы нұсқаулығын қараңыз.