IClientChannelSinkProvider 인터페이스

정의

원격 메시지가 흐를 때 통과할 클라이언트 채널에 대한 클라이언트 채널 싱크를 만듭니다.

public interface class IClientChannelSinkProvider
public interface IClientChannelSinkProvider
[System.Runtime.InteropServices.ComVisible(true)]
public interface IClientChannelSinkProvider
type IClientChannelSinkProvider = interface
[<System.Runtime.InteropServices.ComVisible(true)>]
type IClientChannelSinkProvider = interface
Public Interface IClientChannelSinkProvider
파생
특성

예제

다음 코드 예제에는이 인터페이스의 구현을 보여 줍니다.

[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*/ ){}
};
public class ClientSinkProvider : IClientChannelSinkProvider
{

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

    public IClientChannelSinkProvider Next
    {
        get
        {
            return(nextProvider);
        }
        set
        {
            nextProvider = value;
        }
    }

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

참조는 IClientChannelSink 인터페이스 설명을 해당 클라이언트 싱크 구현의 예입니다.

설명

구현을 통해 클라이언트 채널에 연결 된 채널 싱크는 IClientChannelSinkProvider 인터페이스입니다. 사용 하는 생성자를 제공 하는 모든 원격 클라이언트 채널을 IClientChannelSinkProvider 매개 변수로 합니다.

채널 싱크 공급자 체인에 저장 됩니다 하 고 사용자가 외부 채널 생성자 하나를 전달 하기 전에 모든 채널 싱크 공급자를 함께 연결 하는 일을 담당 합니다. IClientChannelSinkProvider 이라는 속성을 제공 Next 이 목적입니다.

여러 채널 싱크 공급자는 구성 파일에 지정 하는 경우 원격 인프라 연결 합니다 구성 파일에서 발견 되는 순서에서입니다. 채널 싱크 공급자 채널 중 만들어질 때 생성 됩니다는 RemotingConfiguration.Configure 호출 합니다.

속성

Next

채널 싱크 공급자 체인에 있는 다음 싱크 공급자를 가져오거나 설정합니다.

메서드

CreateSink(IChannelSender, String, Object)

싱크 체인을 만듭니다.

적용 대상