ApplicationQueuingAttribute Class
Enables queuing support for the marked assembly and enables the application to read method calls from Message Queuing queues. This class cannot be inherited.
Assembly: System.EnterpriseServices (in System.EnterpriseServices.dll)
For a list of initial property values for an instance of ApplicationQueuingAttribute, see the ApplicationQueuingAttribute constructor.
For more information about using attributes, see Extending Metadata Using Attributes.
The following code example demonstrates the use of the ApplicationQueuingAttribute type.
Imports System Imports System.EnterpriseServices Imports System.Reflection ' References: ' System.EnterpriseServices <Assembly: ApplicationQueuing()> Public Class ApplicationQueuingExample Inherits ServicedComponent Public Sub ApplicationQueuingAttribute_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) End Sub 'ApplicationQueuingAttribute_Enabled Public Sub ApplicationQueuingAttribute_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) End Sub 'ApplicationQueuingAttribute_QueueListenerEnabled Public Sub ApplicationQueuingAttribute_MaxListenerThreads() ' 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 MaxListenerThreads ' property. MsgBox("ApplicationQueuingAttribute.MaxListenerThreads: " & attribute.MaxListenerThreads) ' Set the MaxListenerThreads property value of the attribute. attribute.MaxListenerThreads = 1 ' Display the new value of the attribute's MaxListenerThreads ' property. MsgBox("ApplicationQueuingAttribute.MaxListenerThreads: " & attribute.MaxListenerThreads) End Sub 'ApplicationQueuingAttribute_MaxListenerThreads End Class 'ApplicationQueuingExample
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.