ApplicationQueuingAttribute.QueueListenerEnabled 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置一个值,该值指示应用程序是否将从客户端接受已排队的组件调用。
public:
property bool QueueListenerEnabled { bool get(); void set(bool value); };
public bool QueueListenerEnabled { get; set; }
member this.QueueListenerEnabled : bool with get, set
Public Property QueueListenerEnabled As Boolean
属性值
如果应用程序接受已排队的组件调用,则为 true
;否则为 false
。 默认值为 false
。
示例
下面的代码示例获取并设置特性的 QueueListenerEnabled 属性的值ApplicationQueuing
。
// 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);
' 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 QueueListenerEnabled
' property.
MsgBox("ApplicationQueuingAttribute.QueueListenerEnabled: " & attribute.Enabled)
' Set the QueueListenerEnabled property value of the attribute.
attribute.QueueListenerEnabled = False
' Display the new value of the attribute's QueueListenerEnabled
' property.
MsgBox("ApplicationQueuingAttribute.QueueListenerEnabled: " & attribute.QueueListenerEnabled)