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

IClientChannelSinkProvider インターフェイス

リモート処理メッセージが流れているクライアント チャネルのクライアント チャネル シンクを作成します。

名前空間: System.Runtime.Remoting.Channels
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

<ComVisibleAttribute(True)> _
Public Interface IClientChannelSinkProvider
Dim instance As IClientChannelSinkProvider
[ComVisibleAttribute(true)] 
public interface IClientChannelSinkProvider
[ComVisibleAttribute(true)] 
public interface class IClientChannelSinkProvider
/** @attribute ComVisibleAttribute(true) */ 
public interface IClientChannelSinkProvider
ComVisibleAttribute(true) 
public interface IClientChannelSinkProvider
解説解説
使用例使用例

このインターフェイスの実装を示すコード例を次に示します。

public class ClientSinkProvider : IClientChannelSinkProvider
{

    // The next provider in the chain.
    private IClientChannelSinkProvider nextProvider;

    public IClientChannelSinkProvider Next
    {
        [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.Infrastructure)]
        get
        {
            return(nextProvider);
        }
        [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.Infrastructure)]
        set
        {
            nextProvider = value;
        }
    }

    [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.Infrastructure)]
    public IClientChannelSink CreateSink (IChannelSender channel,
 String url, Object remoteChannelData)
    {

        Console.WriteLine("Creating ClientSink for {0}",
 url);

        // Create the next sink in the chain.
        IClientChannelSink nextSink = nextProvider.CreateSink(channel, url, remoteChannelData);

        // Hook our sink up to it.
        return( new ClientSink(nextSink) );
    }

    // This constructor is required in order to use the provider in
 file-based configuration.
    // It need not do anything unless you want to use the information
 in the parameters.
    public ClientSinkProvider (IDictionary properties, ICollection
 providerData) {}
    
}
[System::Security::Permissions::PermissionSet(System::Security::
   Permissions::SecurityAction::Demand, Name = "FullTrust")]
public ref class ClientSinkProvider: public
 IClientChannelSinkProvider
{
private:

   // The next provider in the chain.
   IClientChannelSinkProvider^ nextProvider;

public:
   property IClientChannelSinkProvider^ Next 
   {
      virtual IClientChannelSinkProvider^ get()
      {
         return (nextProvider);
      }

      virtual void set( IClientChannelSinkProvider^
 value )
      {
         nextProvider = value;
      }
   }

   virtual IClientChannelSink^ CreateSink( IChannelSender^ channel, String^ url,
 Object^ remoteChannelData )
   {
      Console::WriteLine( "Creating ClientSink for {0}",
 url );
      
      // Create the next sink in the chain.
      IClientChannelSink^ nextSink = nextProvider->CreateSink( channel, url, remoteChannelData
 );
      
      // Hook our sink up to it.
      return (gcnew ClientSink( nextSink ));
   }

   // This constructor is required in order to use the provider in file-based
 configuration.
   // It need not do anything unless you want to use the information
 in the parameters.
   ClientSinkProvider( IDictionary^ /*properties*/, ICollection^ /*providerData*/
 ){}
};
/** @attribute SecurityPermission(SecurityAction.Demand, Flags = SecurityPermissionFlag.Infrastructure)
*/
public class ClientSinkProvider implements
 IClientChannelSinkProvider
{
    // The next provider in the chain.
    private IClientChannelSinkProvider nextProvider;

    /** @property 
     */
    public IClientChannelSinkProvider get_Next()
    {
        return nextProvider;
    }//get_Next

    /** @property
     */
    public void set_Next(IClientChannelSinkProvider
 value)
    {
        nextProvider = value;
    }//set_Next

    public IClientChannelSink CreateSink(IChannelSender channel,
 String url,
        Object remoteChannelData)
    {
        Console.WriteLine("Creating ClientSink for {0}",
 url);
        // Create the next sink in the chain.
        IClientChannelSink nextSink = nextProvider.CreateSink(channel, url,
            remoteChannelData);
        // Hook our sink up to it.
        return new ClientSink(nextSink);
    } //CreateSink

    // This constructor is required in order to use the provider in
 file-based 
    //configuration. It need not do anything unless you want to use
 the 
    // information in the parameters.
    public ClientSinkProvider(IDictionary properties, ICollection
 providerData)
    {
    } //ClientSinkProvider 
} //ClientSinkProvider

対応するクライアント シンクの実装例については、IClientChannelSink インターフェイスのドキュメントを参照してください。

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
IClientChannelSinkProvider メンバ
System.Runtime.Remoting.Channels 名前空間

IClientChannelSinkProvider プロパティ


IClientChannelSinkProvider メソッド


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

  名前 説明
パブリック メソッド CreateSink シンク チェインを作成します。
参照参照

関連項目

IClientChannelSinkProvider インターフェイス
System.Runtime.Remoting.Channels 名前空間

IClientChannelSinkProvider メンバ




英和和英テキスト翻訳

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

辞書ショートカット

すべての辞書の索引

「IClientChannelSinkProvider」の関連用語

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

   

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



IClientChannelSinkProviderのページの著作権

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

©2026 GRAS Group, Inc.RSS