.NET Framework Class Library
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.

Inheritance Hierarchy
SystemObject
   SystemAttribute
    System.EnterpriseServicesApplicationQueuingAttribute

Namespace:   System.EnterpriseServices
Assembly:  System.EnterpriseServices (in System.EnterpriseServices.dll)
Syntax
<[%$TOPIC/b6ftx4c3_en-us_VS_110_2_0_0_0_0%](False)> _
<[%$TOPIC/b6ftx4c3_en-us_VS_110_2_0_0_0_1%]([%$TOPIC/b6ftx4c3_en-us_VS_110_2_0_0_0_2%].Assembly, Inherited := True)> _
Public NotInheritable Class ApplicationQueuingAttribute _
	Inherits [%$TOPIC/b6ftx4c3_en-us_VS_110_2_0_0_0_3%]
[[%$TOPIC/b6ftx4c3_en-us_VS_110_2_0_1_0_0%](false)]
[[%$TOPIC/b6ftx4c3_en-us_VS_110_2_0_1_0_1%]([%$TOPIC/b6ftx4c3_en-us_VS_110_2_0_1_0_2%].Assembly, Inherited = true)]
public sealed class ApplicationQueuingAttribute : [%$TOPIC/b6ftx4c3_en-us_VS_110_2_0_1_0_3%]
[[%$TOPIC/b6ftx4c3_en-us_VS_110_2_0_2_0_0%](false)]
[[%$TOPIC/b6ftx4c3_en-us_VS_110_2_0_2_0_1%]([%$TOPIC/b6ftx4c3_en-us_VS_110_2_0_2_0_2%]::Assembly, Inherited = true)]
public ref class ApplicationQueuingAttribute sealed : public [%$TOPIC/b6ftx4c3_en-us_VS_110_2_0_2_0_3%]
[<[%$TOPIC/b6ftx4c3_en-us_VS_110_2_0_3_0_0%]>]
[<[%$TOPIC/b6ftx4c3_en-us_VS_110_2_0_3_0_1%](false)>]
[<[%$TOPIC/b6ftx4c3_en-us_VS_110_2_0_3_0_2%]([%$TOPIC/b6ftx4c3_en-us_VS_110_2_0_3_0_3%].Assembly, Inherited = true)>]
type ApplicationQueuingAttribute =  
    class 
        inherit [%$TOPIC/b6ftx4c3_en-us_VS_110_2_0_3_0_4%] 
    end

The ApplicationQueuingAttribute type exposes the following members.

Constructors
  NameDescription
Public method ApplicationQueuingAttributeInitializes a new instance of the ApplicationQueuingAttribute class, enabling queuing support for the assembly and initializing Enabled, QueueListenerEnabled, and MaxListenerThreads.
Top
Properties
  NameDescription
Public property EnabledGets or sets a value indicating whether queuing support is enabled.
Public property MaxListenerThreadsGets or sets the number of threads used to extract messages from the queue and activate the corresponding component.
Public property QueueListenerEnabledGets or sets a value indicating whether the application will accept queued component calls from clients.
Public property TypeIdWhen implemented in a derived class, gets a unique identifier for this Attribute. (Inherited from Attribute.)
Top
Methods
  NameDescription
Public method EqualsInfrastructure. Returns a value that indicates whether this instance is equal to a specified object. (Inherited from Attribute.)
Public method GetHashCodeReturns the hash code for this instance. (Inherited from Attribute.)
Public method GetTypeGets the Type of the current instance. (Inherited from Object.)
Public method IsDefaultAttributeWhen overridden in a derived class, indicates whether the value of this instance is the default value for the derived class. (Inherited from Attribute.)
Public method MatchWhen overridden in a derived class, returns a value that indicates whether this instance equals a specified object. (Inherited from Attribute.)
Public method ToStringReturns a string that represents the current object. (Inherited from Object.)
Top
Explicit Interface Implementations
  NameDescription
Explicit interface implemetation Private method _AttributeGetIDsOfNamesMaps a set of names to a corresponding set of dispatch identifiers. (Inherited from Attribute.)
Explicit interface implemetation Private method _AttributeGetTypeInfoRetrieves the type information for an object, which can be used to get the type information for an interface. (Inherited from Attribute.)
Explicit interface implemetation Private method _AttributeGetTypeInfoCountRetrieves the number of type information interfaces that an object provides (either 0 or 1). (Inherited from Attribute.)
Explicit interface implemetation Private method _AttributeInvokeProvides access to properties and methods exposed by an object. (Inherited from Attribute.)
Top
Remarks

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.

Examples

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
using System;
using System.EnterpriseServices;
using System.Reflection;

// References: 
// System.EnterpriseServices

[assembly: ApplicationQueuing]

public class ApplicationQueuingExample : ServicedComponent
{
    public void 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.
        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);

    }

    public void 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.
        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);

    }

    public void 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.
        ApplicationQueuingAttribute attribute =
            (ApplicationQueuingAttribute)Attribute.GetCustomAttribute(
            System.Reflection.Assembly.GetExecutingAssembly(),
            typeof(ApplicationQueuingAttribute),
            false);

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

        // Set the MaxListenerThreads property value of the attribute.
        attribute.MaxListenerThreads = 1;

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

    }
}
Version Information

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Platforms

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.