InterfaceQueuingAttributeとは? わかりやすく解説

InterfaceQueuingAttribute クラス

マークされたインターフェイスのキュー サポートを有効にします。このクラスは継承できません。

名前空間: System.EnterpriseServices
アセンブリ: System.EnterpriseServices (system.enterpriseservices.dll 内)
構文構文

<ComVisibleAttribute(False)> _
<AttributeUsageAttribute(AttributeTargets.Class Or AttributeTargets.Interface,
 Inherited:=True, AllowMultiple:=True)> _
Public NotInheritable Class
 InterfaceQueuingAttribute
    Inherits Attribute
Dim instance As InterfaceQueuingAttribute
[ComVisibleAttribute(false)] 
[AttributeUsageAttribute(AttributeTargets.Class|AttributeTargets.Interface, Inherited=true,
 AllowMultiple=true)] 
public sealed class InterfaceQueuingAttribute
 : Attribute
[ComVisibleAttribute(false)] 
[AttributeUsageAttribute(AttributeTargets::Class|AttributeTargets::Interface, Inherited=true,
 AllowMultiple=true)] 
public ref class InterfaceQueuingAttribute
 sealed : public Attribute
/** @attribute ComVisibleAttribute(false) */ 
/** @attribute AttributeUsageAttribute(AttributeTargets.Class|AttributeTargets.Interface,
 Inherited=true, AllowMultiple=true) */ 
public final class InterfaceQueuingAttribute
 extends Attribute
ComVisibleAttribute(false) 
AttributeUsageAttribute(AttributeTargets.Class|AttributeTargets.Interface, Inherited=true,
 AllowMultiple=true) 
public final class InterfaceQueuingAttribute
 extends Attribute
解説解説
使用例使用例

InterfaceQueuingAttribute 属性の使用方法を次のコード例に示します。

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
    }
}
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
   }

};

ApplicationQueuing 属性を使用して、コンパイル時に COM+ アプリケーションをキューに置かれているアプリケーションとしてマークし、QueueListenerEnabled を true に設定することにより COM+ リスナを有効化する方法を次のコード例に示します。

// 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 = 
    (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 = 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 );
継承階層継承階層
System.Object
   System.Attribute
    System.EnterpriseServices.InterfaceQueuingAttribute
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバの場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

InterfaceQueuingAttribute コンストラクタ ()

InterfaceQueuingAttribute クラスの新しいインスタンスを初期化して、Enabled プロパティおよび Interface プロパティを既定値に設定します。

名前空間: System.EnterpriseServices
アセンブリ: System.EnterpriseServices (system.enterpriseservices.dll 内)
構文構文

Dim instance As New InterfaceQueuingAttribute
public InterfaceQueuingAttribute ()
public:
InterfaceQueuingAttribute ()
public InterfaceQueuingAttribute ()
public function InterfaceQueuingAttribute ()
解説解説

InterfaceQueuingAttribute のインスタンスの初期プロパティ値を次の表に示します。

使用例使用例

新しい InterfaceQueuingAttribute を作成するコード例を次に示します。

<InterfaceQueuing()>  _
Public Interface IInterfaceQueuingAttribute_Ctor
End Interface 'IInterfaceQueuingAttribute_Ctor
[InterfaceQueuing]
public interface IInterfaceQueuingAttribute_Ctor
{
}
[InterfaceQueuing]
interface class IInterfaceQueuingAttribute_Ctor{};
/** @attribute InterfaceQueuing()
 */
public interface IInterfaceQueuingAttribute_Ctor
{
} //IInterfaceQueuingAttribute_Ctor
.NET Framework のセキュリティ.NET Framework のセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
InterfaceQueuingAttribute クラス
InterfaceQueuingAttribute メンバ
System.EnterpriseServices 名前空間

InterfaceQueuingAttribute コンストラクタ

InterfaceQueuingAttribute クラスの新しいインスタンスを初期化して、キュー サポートを有効にします。
オーバーロードの一覧オーバーロードの一覧

名前 説明
InterfaceQueuingAttribute () InterfaceQueuingAttribute クラスの新しいインスタンスを初期化して、Enabled プロパティおよび Interface プロパティを既定値に設定します。
InterfaceQueuingAttribute (Boolean) InterfaceQueuingAttribute クラスの新しいインスタンスを初期化して、オプションでキュー サポートを無効にします。
参照参照

関連項目

InterfaceQueuingAttribute クラス
InterfaceQueuingAttribute メンバ
System.EnterpriseServices 名前空間

InterfaceQueuingAttribute コンストラクタ (Boolean)

InterfaceQueuingAttribute クラスの新しいインスタンスを初期化して、オプションでキュー サポートを無効にします。

名前空間: System.EnterpriseServices
アセンブリ: System.EnterpriseServices (system.enterpriseservices.dll 内)
構文構文

Dim enabled As Boolean

Dim instance As New InterfaceQueuingAttribute(enabled)
public InterfaceQueuingAttribute (
    bool enabled
)
public:
InterfaceQueuingAttribute (
    bool enabled
)
public InterfaceQueuingAttribute (
    boolean enabled
)
public function InterfaceQueuingAttribute (
    enabled : boolean
)

パラメータ

enabled

キュー サポートを有効にする場合は true。それ以外の場合は false。

使用例使用例

新しい InterfaceQueuingAttribute を作成するコード例を次に示します。

<InterfaceQueuing(True)>  _
Public Interface IInterfaceQueuingAttribute_Ctor_Bool
End Interface 'IInterfaceQueuingAttribute_Ctor_Bool
[InterfaceQueuing(true)]
public interface IInterfaceQueuingAttribute_Ctor_Bool
{
}
[InterfaceQueuing(true)]
interface class IInterfaceQueuingAttribute_Ctor_Bool{};
/** @attribute InterfaceQueuing(true)
 */
public interface IInterfaceQueuingAttribute_Ctor_Bool
{
} //IInterfaceQueuingAttribute_Ctor_Bool
.NET Framework のセキュリティ.NET Framework のセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
InterfaceQueuingAttribute クラス
InterfaceQueuingAttribute メンバ
System.EnterpriseServices 名前空間

InterfaceQueuingAttribute プロパティ


InterfaceQueuingAttribute メソッド


パブリック メソッドパブリック メソッド

( プロテクト メソッド も参照)
  名前 説明
パブリック メソッド Equals  オーバーロードされます。 ( Attribute から継承されます。)
パブリック メソッド GetCustomAttribute  オーバーロードされます。 アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用された指定した型のカスタム属性を取得します。 ( Attribute から継承されます。)
パブリック メソッド GetCustomAttributes  オーバーロードされます。 アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用されたカスタム属性の配列を取得します。 ( Attribute から継承されます。)
パブリック メソッド GetHashCode  このインスタンスのハッシュ コードを返します。 ( Attribute から継承されます。)
パブリック メソッド GetType  現在のインスタンスの Type を取得します。 ( Object から継承されます。)
パブリック メソッド IsDefaultAttribute  派生クラス内でオーバーライドされたときに、このインスタンスの値が派生クラスの既定値かどうかを示します。 ( Attribute から継承されます。)
パブリック メソッド IsDefined  オーバーロードされます。 指定した型のカスタム属性が、アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用されているかどうかを判断します。 ( Attribute から継承されます。)
パブリック メソッド Match  派生クラス内でオーバーライドされたときに、指定したオブジェクトとこのインスタンスが等しいかどうかを示す値を返します。 ( Attribute から継承されます。)
パブリック メソッド ReferenceEquals  指定した複数の Object インスタンスが同一かどうかを判断します。 ( Object から継承されます。)
パブリック メソッド ToString  現在の Object を表す String を返します。 ( Object から継承されます。)
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

InterfaceQueuingAttribute クラス
System.EnterpriseServices 名前空間

InterfaceQueuingAttribute メンバ

マークされたインターフェイスのキュー サポートを有効にします。このクラスは継承できません。

InterfaceQueuingAttribute データ型で公開されるメンバを以下の表に示します。


パブリック コンストラクタパブリック コンストラクタ
  名前 説明
パブリック メソッド InterfaceQueuingAttribute オーバーロードされます。 InterfaceQueuingAttribute クラスの新しいインスタンスを初期化して、キュー サポートを有効にします。
パブリック プロパティパブリック プロパティ
パブリック メソッドパブリック メソッド
( プロテクト メソッド も参照)
  名前 説明
パブリック メソッド Equals  オーバーロードされます。 ( Attribute から継承されます。)
パブリック メソッド GetCustomAttribute  オーバーロードされます。 アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用された指定した型のカスタム属性を取得します。 (Attribute から継承されます。)
パブリック メソッド GetCustomAttributes  オーバーロードされます。 アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用されたカスタム属性の配列を取得します。 (Attribute から継承されます。)
パブリック メソッド GetHashCode  このインスタンスのハッシュ コードを返します。 (Attribute から継承されます。)
パブリック メソッド GetType  現在のインスタンスの Type を取得します。 (Object から継承されます。)
パブリック メソッド IsDefaultAttribute  派生クラス内でオーバーライドされたときに、このインスタンスの値が派生クラスの既定値かどうかを示します。 (Attribute から継承されます。)
パブリック メソッド IsDefined  オーバーロードされます。 指定した型のカスタム属性が、アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用されているかどうかを判断します。 (Attribute から継承されます。)
パブリック メソッド Match  派生クラス内でオーバーライドされたときに、指定したオブジェクトとこのインスタンスが等しいかどうかを示す値を返します。 (Attribute から継承されます。)
パブリック メソッド ReferenceEquals  指定した複数の Object インスタンスが同一かどうかを判断します。 (Object から継承されます。)
パブリック メソッド ToString  現在の Object を表す String を返します。 (Object から継承されます。)
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

InterfaceQueuingAttribute クラス
System.EnterpriseServices 名前空間



英和和英テキスト翻訳

英語⇒日本語日本語⇒英語

辞書ショートカット

すべての辞書の索引

「InterfaceQueuingAttribute」の関連用語

InterfaceQueuingAttributeのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



InterfaceQueuingAttributeのページの著作権

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2026 Microsoft.All rights reserved.

©2026 GRAS Group, Inc.RSS