ApplicationQueuingAttribute.QueueListenerEnabled Propriété

Définition

Obtient ou définit une valeur indiquant si l'application accepte les appels de composants en file d'attente qui proviennent de clients.

C#
public bool QueueListenerEnabled { get; set; }

Valeur de propriété

true si l'application accepte les appels de composants en file d'attente ; sinon, false. La valeur par défaut est false.

Exemples

L’exemple de code suivant obtient et définit la valeur de la propriété d’un ApplicationQueuingQueueListenerEnabled attribut.

C#
// This example code requires that an ApplicationQueuing attribute be
// applied to the assembly, as shown below:
// [assembly: ApplicationQueuing]

// Get the ApplicationQueuingAttribute applied to the assembly.
ApplicationQueuingAttribute attribute =
    (ApplicationQueuingAttribute)Attribute.GetCustomAttribute(
    System.Reflection.Assembly.GetExecutingAssembly(),
    typeof(ApplicationQueuingAttribute),
    false);

// Display the current value of the attribute's QueueListenerEnabled
// property.
Console.WriteLine(
    "ApplicationQueuingAttribute.QueueListenerEnabled: {0}",
    attribute.Enabled);

// Set the QueueListenerEnabled property value of the attribute.
attribute.QueueListenerEnabled = false;

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

S’applique à

Produit Versions
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1