IServerChannelSinkProvider 인터페이스

정의

원격 메시지가 흐를 때 통과할 서버 채널에 대한 서버 채널 싱크를 만듭니다.

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

예제

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

[System::Security::Permissions::PermissionSet(System::Security::
   Permissions::SecurityAction::Demand, Name = "FullTrust")]
public ref class ServerSinkProvider: public IServerChannelSinkProvider
{
   // The next provider in the chain.
private:
   IServerChannelSinkProvider^ nextProvider;

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

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

   virtual IServerChannelSink^ CreateSink( IChannelReceiver^ channel )
   {
      Console::WriteLine( "Creating ServerSink" );

      // Create the next sink in the chain.
      IServerChannelSink^ nextSink = nextProvider->CreateSink( channel );

      // Hook our sink up to it.
      return (gcnew ServerSink( nextSink ));
   }

   virtual void GetChannelData( IChannelDataStore^ /*channelData*/ ){}

   // 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.
   ServerSinkProvider( IDictionary^ /*properties*/, ICollection^ /*providerData*/ ){}
};
public class ServerSinkProvider : IServerChannelSinkProvider
{

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

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

    public IServerChannelSink CreateSink (IChannelReceiver channel)
    {
        Console.WriteLine("Creating ServerSink");

        // Create the next sink in the chain.
        IServerChannelSink nextSink = nextProvider.CreateSink(channel);

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

    public void GetChannelData (IChannelDataStore channelData) {}

    // 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 ServerSinkProvider (IDictionary properties, ICollection providerData) {}
}

참조는 IServerChannelSink 인터페이스 설명을 해당 서버 싱크 구현의 예입니다.

설명

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

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

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

후는 IMethodCallMessage 생성 되 면.NET Framework를 찾으려고 호출을 처리할 수 있는 등록 된 채널의 목록을 검색 합니다. 채널 싱크는 채널에서 검색 됩니다 적절 한 채널을 찾으면 및 IMethodCallMessage 처리에 대 한 싱크로 전달 됩니다.

속성

Next

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

메서드

CreateSink(IChannelReceiver)

싱크 체인을 만듭니다.

GetChannelData(IChannelDataStore)

현재 싱크와 관련된 채널에 대한 채널 데이터를 반환합니다.

적용 대상