다음을 통해 공유


TcpClientChannel 생성자

정의

TcpClientChannel 클래스의 새 인스턴스를 초기화합니다.

오버로드

TcpClientChannel()

TcpClientChannel 클래스의 새 인스턴스를 초기화합니다.

TcpClientChannel(IDictionary, IClientChannelSinkProvider)

지정된 구성 속성 및 싱크를 사용하여 TcpClientChannel 클래스의 새 인스턴스를 초기화합니다.

TcpClientChannel(String, IClientChannelSinkProvider)

지정된 이름 및 싱크를 사용하여 TcpClientChannel 클래스의 새 인스턴스를 초기화합니다.

TcpClientChannel()

TcpClientChannel 클래스의 새 인스턴스를 초기화합니다.

public:
 TcpClientChannel();
public TcpClientChannel ();
Public Sub New ()

예제

다음 코드 예제에서는이 생성자의 사용을 보여 줍니다.

// Set up a client channel.
TcpClientChannel^ clientChannel = gcnew TcpClientChannel;
ChannelServices::RegisterChannel( clientChannel );
// Set up a client channel.
TcpClientChannel clientChannel = new TcpClientChannel();
ChannelServices.RegisterChannel(clientChannel);

설명

구성 속성을 TcpClientChannel 이 생성자에 의해 반환 된 인스턴스 모두 기본값으로 설정 됩니다.

적용 대상

TcpClientChannel(IDictionary, IClientChannelSinkProvider)

지정된 구성 속성 및 싱크를 사용하여 TcpClientChannel 클래스의 새 인스턴스를 초기화합니다.

public:
 TcpClientChannel(System::Collections::IDictionary ^ properties, System::Runtime::Remoting::Channels::IClientChannelSinkProvider ^ sinkProvider);
public TcpClientChannel (System.Collections.IDictionary properties, System.Runtime.Remoting.Channels.IClientChannelSinkProvider sinkProvider);
new System.Runtime.Remoting.Channels.Tcp.TcpClientChannel : System.Collections.IDictionary * System.Runtime.Remoting.Channels.IClientChannelSinkProvider -> System.Runtime.Remoting.Channels.Tcp.TcpClientChannel
Public Sub New (properties As IDictionary, sinkProvider As IClientChannelSinkProvider)

매개 변수

properties
IDictionary

채널에서 사용할 구성 속성의 값을 지정하는 IDictionary 컬렉션입니다.

sinkProvider
IClientChannelSinkProvider

채널에서 사용할 IServerChannelSinkProvider 구현입니다.

예외

구성 속성의 형식이 올바르지 않습니다.

예제

다음 코드 예제에서는 만들려면이 생성자를 사용 하는 TcpClientChannel 특정 구성 속성을 가진 개체입니다.

// Specify client channel properties.
IDictionary^ dict = gcnew Hashtable;
dict[ "port" ] = 9090;
dict[ "impersonationLevel" ] = "Identify";
dict[ "authenticationPolicy" ] = "AuthPolicy, Policy";

// Set up a client channel.
TcpClientChannel^ clientChannel = gcnew TcpClientChannel( dict, nullptr );
ChannelServices::RegisterChannel( clientChannel, false );
// Specify client channel properties.
IDictionary dict = new Hashtable();
dict["port"] = 9090;
dict["impersonationLevel"] = "Identify";
dict["authenticationPolicy"] = "AuthPolicy, Policy";

// Set up a client channel.
TcpClientChannel clientChannel = new TcpClientChannel(dict, null);
ChannelServices.RegisterChannel(clientChannel, false);

설명

채널 구성 속성에 대 한 자세한 내용은 참조 하세요. 채널 및 포맷터 구성 속성합니다.

싱크 기능에 필요 하지 않은 경우 설정 합니다 sinkProvider 매개 변수를 null입니다.

추가 정보

적용 대상

TcpClientChannel(String, IClientChannelSinkProvider)

지정된 이름 및 싱크를 사용하여 TcpClientChannel 클래스의 새 인스턴스를 초기화합니다.

public:
 TcpClientChannel(System::String ^ name, System::Runtime::Remoting::Channels::IClientChannelSinkProvider ^ sinkProvider);
public TcpClientChannel (string name, System.Runtime.Remoting.Channels.IClientChannelSinkProvider sinkProvider);
new System.Runtime.Remoting.Channels.Tcp.TcpClientChannel : string * System.Runtime.Remoting.Channels.IClientChannelSinkProvider -> System.Runtime.Remoting.Channels.Tcp.TcpClientChannel
Public Sub New (name As String, sinkProvider As IClientChannelSinkProvider)

매개 변수

name
String

채널 이름입니다.

sinkProvider
IClientChannelSinkProvider

채널에서 사용할 IClientChannelSinkProvider 구현입니다.

예제

다음 코드 예제를 생성 하는 방법을 보여 줍니다는 TcpClientChannel합니다.

// Create the channel.
TcpClientChannel^ clientChannel = gcnew TcpClientChannel( "Client",nullptr );
// Create the channel.
TcpClientChannel clientChannel = new TcpClientChannel("Client", null);

설명

이 생성자는 설정 합니다 ChannelName 를 사용 하 여 속성을 name 매개 변수입니다. 둘 이상의 채널을 등록 하려는 경우 각 채널에 고유 이름이 있어야 합니다.

싱크 기능에 필요 하지 않은 경우 설정 합니다 sinkProvider 매개 변수를 null입니다.

적용 대상