MessageQueuePermissionAttribute.Label-Eigenschaft
Ruft die Beschreibung der Warteschlange ab oder legt diese fest.
Namespace: System.Messaging
Assembly: System.Messaging (in system.messaging.dll)
Syntax
'Declaration
Public Property Label As String
'Usage
Dim instance As MessageQueuePermissionAttribute
Dim value As String
value = instance.Label
instance.Label = value
public string Label { get; set; }
public:
property String^ Label {
String^ get ();
void set (String^ value);
}
/** @property */
public String get_Label ()
/** @property */
public void set_Label (String value)
public function get Label () : String
public function set Label (value : String)
Eigenschaftenwert
Die Bezeichnung der Meldungswarteschlange.
Ausnahmen
Ausnahmetyp | Bedingung |
---|---|
Der Wert ist NULL (Nothing in Visual Basic). |
Beispiel
Im folgenden Codebeispiel wird der Wert der Label-Eigenschaft einer Meldungswarteschlangenberechtigung für ein Attribut abgerufen und festgelegt.
// 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);
// 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.set_Label(queue.get_Label());
// Display the new value of the attribute's Label property.
Console.WriteLine("attribute.Label: {0}", attribute.get_Label());
.NET Framework-Sicherheit
- Volle Vertrauenswürdigkeit für den unmittelbaren Aufrufer. Dieser Member kann von nur teilweise vertrauenswürdigem Code nicht verwendet werden. Weitere Informationen finden Sie unter .
Plattformen
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.
Versionsinformationen
.NET Framework
Unterstützt in: 2.0, 1.1, 1.0
Siehe auch
Referenz
MessageQueuePermissionAttribute-Klasse
MessageQueuePermissionAttribute-Member
System.Messaging-Namespace