ApplicationQueuingAttribute.Enabled Propiedad

Definición

Obtiene o establece un valor que indica si la capacidad de utilización de una cola está habilitada.Gets or sets a value indicating whether queuing support is enabled.

public:
 property bool Enabled { bool get(); void set(bool value); };
public bool Enabled { get; set; }
member this.Enabled : bool with get, set
Public Property Enabled As Boolean

Valor de propiedad

true si está habilitada; en caso contrario, false.true if queuing support is enabled; otherwise, false. El valor predeterminado establecido por el constructor es true.The default value set by the constructor is true.

Ejemplos

En el ejemplo de código siguiente se obtiene y se establece ApplicationQueuing el valor Enabled de la propiedad de un atributo.The following code example gets and sets the value of an ApplicationQueuing attribute's Enabled property.

// 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 Enabled property.
Console.WriteLine("ApplicationQueuingAttribute.Enabled: {0}",
    attribute.Enabled);

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

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

' 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.
Dim attribute As ApplicationQueuingAttribute = CType(Attribute.GetCustomAttribute(System.Reflection.Assembly.GetExecutingAssembly(), GetType(ApplicationQueuingAttribute), False), ApplicationQueuingAttribute)

' Display the current value of the attribute's Enabled property.
MsgBox("ApplicationQueuingAttribute.Enabled: " & attribute.Enabled)

' Set the Enabled property value of the attribute.
attribute.Enabled = False

' Display the new value of the attribute's Enabled property.
MsgBox("ApplicationQueuingAttribute.Enabled: " & attribute.Enabled)

Comentarios

De forma predeterminada, las aplicaciones no pueden usar los componentes en cola.Applications are not able to use queued components by default. La creación de instancias permitequeunaaplicaciónusecomponentesencola;sinembargo,nopermitequelaaplicaciónescuchemensajesencoladelosclientes.ApplicationQueuingAttributeInstantiating ApplicationQueuingAttribute enables an application to use queued components; however, it does not enable the application to listen for queued messages from clients.

Se aplica a