IClientChannelSinkProvider 인터페이스
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
원격 메시지가 흐르는 클라이언트 채널에 대한 클라이언트 채널 싱크를 만듭니다.
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 채널이 만들어질 때 만들어집니다.
속성
| Name | Description |
|---|---|
| Next |
채널 싱크 공급자 체인에서 다음 싱크 공급자를 가져오거나 설정합니다. |
메서드
| Name | Description |
|---|---|
| CreateSink(IChannelSender, String, Object) |
싱크 체인을 만듭니다. |