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

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > 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+ アプリケーションキュー置かれているアプリケーションとしてマークしQueueListenerEnabledtrue設定することにより 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) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「InterfaceQueuingAttribute クラス」の関連用語

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

   

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



InterfaceQueuingAttribute クラスのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS