InterfaceQueuingAttribute クラス
アセンブリ: System.EnterpriseServices (system.enterpriseservices.dll 内)
構文<ComVisibleAttribute(False)> _ <AttributeUsageAttribute(AttributeTargets.Class Or AttributeTargets.Interface, Inherited:=True, AllowMultiple:=True)> _ Public NotInheritable Class InterfaceQueuingAttribute Inherits Attribute
[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
解説このインターフェイスでの呼び出しは、メッセージ キューに置かれます。
キューに置かれているインターフェイスとしてインターフェイスをマークするには、[InterfaceQueuing] という構文を使用して、この属性をインターフェイスに適用します。
キューに置かれたインターフェイスのメンバ メソッドは、キューに置かれたメソッド呼び出しの要件 (out パラメータや ref パラメータを持たないなど) を満たす必要があります。
使用例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.Attribute
System.EnterpriseServices.InterfaceQueuingAttribute
スレッド セーフ
プラットフォームWindows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
バージョン情報
参照InterfaceQueuingAttribute コンストラクタ ()
アセンブリ: System.EnterpriseServices (system.enterpriseservices.dll 内)
構文
解説
使用例
.NET Framework のセキュリティ
プラットフォームWindows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
バージョン情報
参照InterfaceQueuingAttribute コンストラクタ
オーバーロードの一覧| 名前 | 説明 |
|---|---|
| InterfaceQueuingAttribute () | InterfaceQueuingAttribute クラスの新しいインスタンスを初期化して、Enabled プロパティおよび Interface プロパティを既定値に設定します。 |
| InterfaceQueuingAttribute (Boolean) | InterfaceQueuingAttribute クラスの新しいインスタンスを初期化して、オプションでキュー サポートを無効にします。 |
参照InterfaceQueuingAttribute コンストラクタ (Boolean)
アセンブリ: System.EnterpriseServices (system.enterpriseservices.dll 内)
構文
使用例
.NET Framework のセキュリティ
プラットフォームWindows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
バージョン情報
参照InterfaceQueuingAttribute プロパティ
パブリック プロパティ| 名前 | 説明 | |
|---|---|---|
| Enabled | キュー サポートが有効かどうかを示す値を取得または設定します。 |
| Interface | キューを有効にするインターフェイスの名前を取得または設定します。 |
| TypeId | 派生クラスに実装されている場合は、この Attribute の一意の識別子を取得します。 ( Attribute から継承されます。) |
参照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 から継承されます。) |
プロテクト メソッド| 名前 | 説明 | |
|---|---|---|
| Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 ( Object から継承されます。) |
| MemberwiseClone | 現在の Object の簡易コピーを作成します。 ( Object から継承されます。) |
参照InterfaceQueuingAttribute メンバ
マークされたインターフェイスのキュー サポートを有効にします。このクラスは継承できません。
InterfaceQueuingAttribute データ型で公開されるメンバを以下の表に示します。
パブリック コンストラクタ| 名前 | 説明 | |
|---|---|---|
| InterfaceQueuingAttribute | オーバーロードされます。 InterfaceQueuingAttribute クラスの新しいインスタンスを初期化して、キュー サポートを有効にします。 |
パブリック プロパティ| 名前 | 説明 | |
|---|---|---|
| Enabled | キュー サポートが有効かどうかを示す値を取得または設定します。 |
| Interface | キューを有効にするインターフェイスの名前を取得または設定します。 |
| TypeId | 派生クラスに実装されている場合は、この Attribute の一意の識別子を取得します。(Attribute から継承されます。) |
パブリック メソッド| 名前 | 説明 | |
|---|---|---|
| Equals | オーバーロードされます。 ( Attribute から継承されます。) |
| GetCustomAttribute | オーバーロードされます。 アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用された指定した型のカスタム属性を取得します。 (Attribute から継承されます。) |
| GetCustomAttributes | オーバーロードされます。 アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用されたカスタム属性の配列を取得します。 (Attribute から継承されます。) |
| GetHashCode | このインスタンスのハッシュ コードを返します。 (Attribute から継承されます。) |
| GetType | 現在のインスタンスの Type を取得します。 (Object から継承されます。) |
| IsDefaultAttribute | 派生クラス内でオーバーライドされたときに、このインスタンスの値が派生クラスの既定値かどうかを示します。 (Attribute から継承されます。) |
| IsDefined | オーバーロードされます。 指定した型のカスタム属性が、アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用されているかどうかを判断します。 (Attribute から継承されます。) |
| Match | 派生クラス内でオーバーライドされたときに、指定したオブジェクトとこのインスタンスが等しいかどうかを示す値を返します。 (Attribute から継承されます。) |
| ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 (Object から継承されます。) |
| ToString | 現在の Object を表す String を返します。 (Object から継承されます。) |
プロテクト メソッド| 名前 | 説明 | |
|---|---|---|
| Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 (Object から継承されます。) |
| MemberwiseClone | 現在の Object の簡易コピーを作成します。 (Object から継承されます。) |
参照Weblioに収録されているすべての辞書からInterfaceQueuingAttributeを検索する場合は、下記のリンクをクリックしてください。
全ての辞書からInterfaceQueuingAttribute
を検索
- InterfaceQueuingAttributeのページへのリンク