ServiceCreatorCallback デリゲートとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > ServiceCreatorCallback デリゲートの意味・解説 

ServiceCreatorCallback デリゲート

要求に応じてサービスインスタンス作成できるコールバック機構提供します

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

<ComVisibleAttribute(True)> _
Public Delegate Function
 ServiceCreatorCallback ( _
    container As IServiceContainer, _
    serviceType As Type _
) As Object
Dim instance As New ServiceCreatorCallback(AddressOf
 HandlerMethod)
[ComVisibleAttribute(true)] 
public delegate Object ServiceCreatorCallback (
    IServiceContainer container,
    Type serviceType
)
[ComVisibleAttribute(true)] 
public delegate Object^ ServiceCreatorCallback (
    IServiceContainer^ container, 
    Type^ serviceType
)
/** @delegate */
/** @attribute ComVisibleAttribute(true) */ 
public delegate Object ServiceCreatorCallback (
    IServiceContainer container, 
    Type serviceType
)
JScript では、デリゲート使用できますが、新規に宣言することはできません。

パラメータ

container

サービス作成要求したサービス コンテナ

serviceType

作成するサービスの型。

戻り値
serviceType によって指定されサービスサービス作成されなかった場合null 参照 (Visual Basic では Nothing)。

解説解説
使用例使用例

コールバック関数使用してサービス発行する方法次のコード例示します

' The following code shows how to publish a service using a callback
 function.

' Creates a service creator callback.
Dim callback1 As New ServiceCreatorCallback
 _
(AddressOf myCallBackMethod)
       
' Adds the service using its type and the service creator.
serviceContainer.AddService(GetType(myService), callback1)
// The following code shows how to publish a service using a callback
 function.

// Creates a service creator callback.
ServiceCreatorCallback callback1 = 
new ServiceCreatorCallback(myCallBackMethod);

// Adds the service using its type and the service creator callback.
serviceContainer.AddService(typeof(myService), callback1);
// The following code shows how to publish a service using a callback
 function.
// Creates a service creator callback.
ServiceCreatorCallback^ callback1 =
   gcnew ServiceCreatorCallback( this, &Sample::myCallBackMethod
 );

// Adds the service using its type and the service creator callback.
serviceContainer->AddService( myService::typeid, callback1 );
// The following code shows how to publish a service using a 
// callback function.
// Creates a service creator callback.
ServiceCreatorCallback callBack1 = new ServiceCreatorCallback(
    MyCallBackMethod);
// Adds the service using its type and the service creator callback.
serviceContainer.AddService(MyService.class.ToType(), callBack1);
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
System.ComponentModel.Design 名前空間
AddService
IServiceContainer インターフェイス


このページでは「.NET Framework クラス ライブラリ リファレンス」からServiceCreatorCallback デリゲートを検索した結果を表示しています。
Weblioに収録されているすべての辞書からServiceCreatorCallback デリゲートを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からServiceCreatorCallback デリゲート を検索

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

辞書ショートカット

すべての辞書の索引

「ServiceCreatorCallback デリゲート」の関連用語

ServiceCreatorCallback デリゲートのお隣キーワード
検索ランキング

   

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



ServiceCreatorCallback デリゲートのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2024 GRAS Group, Inc.RSS