InterfaceQueuingAttribute 클래스

정의

표시된 인터페이스에 대해 큐 지원을 활성화합니다. 이 클래스는 상속될 수 없습니다.

public ref class InterfaceQueuingAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Interface, AllowMultiple=true, Inherited=true)]
[System.Runtime.InteropServices.ComVisible(false)]
public sealed class InterfaceQueuingAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Interface, AllowMultiple=true, Inherited=true)>]
[<System.Runtime.InteropServices.ComVisible(false)>]
type InterfaceQueuingAttribute = class
    inherit Attribute
Public NotInheritable Class InterfaceQueuingAttribute
Inherits Attribute
상속
InterfaceQueuingAttribute
특성

예제

다음 코드 예제를 사용 하는 방법을 보여 줍니다는 InterfaceQueuingAttribute 특성입니다.

public interface class IQueuedComponent
{
   void QueuedTask();
};


// Mark IQueuedComponent interface as queued
// Create the queued component class by inheriting the 
// System.EnterpriseServices.ServicedComponent class and an
// interface that is marked as queued with the InterfaceQueuing attribute

[InterfaceQueuing(true,Interface="IQueuedComponent")]
public ref class QueuedComponent sealed: public ServicedComponent, public IQueuedComponent
{
public:
   virtual void QueuedTask()
   {
      // Perform queued task here
   }

};
public interface IQueuedComponent
{
    void QueuedTask();
}
// Mark IQueuedComponent interface as queued
[InterfaceQueuing(true, Interface="IQueuedComponent")]
// Create the queued component class by inheriting the
// System.EnterpriseServices.ServicedComponent class and an
// interface that is marked as queued with the InterfaceQueuing attribute
public class QueuedComponent : ServicedComponent, IQueuedComponent
{
    public void QueuedTask()
    {
        // Perform queued task here
    }
}

다음 코드 예제를 사용 하 여 컴파일 시간에 큐에 대기 된 COM + 애플리케이션을 표시 하는 방법을 보여 줍니다 합니다 ApplicationQueuing 특성을 설정 하 여 COM + 수신기를 사용 하도록 설정 및는 QueueListenerEnabled true로

// Mark the COM+ application as queued at compile time by using the 
// ApplicationQueuing attribute. Enable the COM+ listener by 
// setting the QueueListenerEnabled to true
[assembly:ApplicationQueuing(Enabled=true,QueueListenerEnabled=true)];
// Mark the COM+ application as queued at compile time by using the
// ApplicationQueuing attribute. Enable the COM+ listener by
// setting the QueueListenerEnabled to true
[assembly: ApplicationQueuing(Enabled=true, QueueListenerEnabled=true)]

다음 코드 예제를 사용 하는 방법을 보여 줍니다 BindToMoniker 레코더에서의 인스턴스를 가져올 큐에 대기 중인된 된 모니커를 실행 하려면 기록 될 및 강제 큐에 메시지를 보내려고 레코더 개체를 해제 하는 메서드를 호출 합니다.

// Use BindToMoniker to run the queued moniker, to get an instance of the recorder
IQueuedComponent ^ qc = dynamic_cast<IQueuedComponent^>(System::Runtime::InteropServices::Marshal::BindToMoniker( "queue:/new:QueuedComponent" ));

// Call the method that will be recorded
qc->QueuedTask();

// Force the release of the recorder object, to send the message to the queue
System::Runtime::InteropServices::Marshal::ReleaseComObject( qc );
// Use BindToMoniker to run the queued moniker, to get an instance of the recorder
IQueuedComponent qc =
    (IQueuedComponent)System.Runtime.InteropServices.Marshal.BindToMoniker("queue:/new:QueuedComponent");
// Call the method that will be recorded
qc.QueuedTask();

// Force the release of the recorder object, to send the message to the queue
System.Runtime.InteropServices.Marshal.ReleaseComObject(qc);

설명

메시지 큐를 사용 하 여이 인터페이스에 대 한 호출이 대기 됩니다.

을 큐에 대기 된 인터페이스를 표시 하려면 다음 구문을 사용 하 여 인터페이스에이 특성을 적용 합니다. [InterfaceQueuing]합니다.

큐에 대기 중인된 인터페이스의 멤버 메서드 없음 등의 큐에 대기 중인된 메서드 호출에 대 한 요구 사항을 충족 해야 합니다 out 또는 ref 매개 변수입니다.

특성을 사용 하는 방법에 대 한 자세한 내용은 참조 하세요. 특성합니다.

생성자

InterfaceQueuingAttribute()

InterfaceQueuingAttributeEnabled 속성을 기본값으로 설정하여 Interface 클래스의 새 인스턴스를 초기화합니다.

InterfaceQueuingAttribute(Boolean)

선택적으로 큐 지원을 비활성화하여 InterfaceQueuingAttribute 클래스의 새 인스턴스를 초기화합니다.

속성

Enabled

큐 지원의 사용 여부를 나타내는 값을 가져오거나 설정합니다.

Interface

큐가 활성화되는 인터페이스의 이름을 가져오거나 설정합니다.

TypeId

파생 클래스에서 구현된 경우 이 Attribute에 대한 고유 식별자를 가져옵니다.

(다음에서 상속됨 Attribute)

메서드

Equals(Object)

이 인스턴스가 지정된 개체와 같은지를 나타내는 값을 반환합니다.

(다음에서 상속됨 Attribute)
GetHashCode()

이 인스턴스의 해시 코드를 반환합니다.

(다음에서 상속됨 Attribute)
GetType()

현재 인스턴스의 Type을 가져옵니다.

(다음에서 상속됨 Object)
IsDefaultAttribute()

파생 클래스에서 재정의된 경우 이 인스턴스 값이 파생 클래스에 대한 기본값인지 여부를 표시합니다.

(다음에서 상속됨 Attribute)
Match(Object)

파생 클래스에서 재정의된 경우 이 인스턴스가 지정된 개체와 같은지 여부를 나타내는 값을 반환합니다.

(다음에서 상속됨 Attribute)
MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)

명시적 인터페이스 구현

_Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)

이름 집합을 해당하는 디스패치 식별자 집합에 매핑합니다.

(다음에서 상속됨 Attribute)
_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr)

인터페이스의 형식 정보를 가져오는 데 사용할 수 있는 개체의 형식 정보를 검색합니다.

(다음에서 상속됨 Attribute)
_Attribute.GetTypeInfoCount(UInt32)

개체에서 제공하는 형식 정보 인터페이스의 수를 검색합니다(0 또는 1).

(다음에서 상속됨 Attribute)
_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)

개체에서 노출하는 메서드와 속성에 대한 액세스를 제공합니다.

(다음에서 상속됨 Attribute)

적용 대상