IpcClientChannel Construtores

Definição

Inicializa uma nova instância da IpcServerChannel classe.

Sobrecargas

Name Description
IpcClientChannel()

Inicializa uma nova instância da IpcServerChannel classe.

IpcClientChannel(IDictionary, IClientChannelSinkProvider)

Inicializa uma nova instância da IpcClientChannel classe com as propriedades de configuração e o sink especificados.

IpcClientChannel(String, IClientChannelSinkProvider)

Inicializa uma nova instância da IpcClientChannel classe com o nome e o sumidouro especificados.

IpcClientChannel()

Inicializa uma nova instância da IpcServerChannel classe.

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

Exemplos

O seguinte exemplo de código mostra como usar este construtor.

IpcClientChannel^ clientChannel = gcnew IpcClientChannel;
ChannelServices::RegisterChannel( clientChannel );
IpcClientChannel clientChannel = new IpcClientChannel();
ChannelServices.RegisterChannel(clientChannel);

Observações

As propriedades de configuração da TcpClientChannel instância devolvida por este construtor estão todas definidas para os seus valores padrão. A tabela seguinte mostra o valor padrão para cada propriedade de configuração.

Propriedade de configuração Descrição
name O nome padrão é "cliente IPC". Cada canal deve ter um nome único.
priority A prioridade padrão é 1.

Aplica-se a

IpcClientChannel(IDictionary, IClientChannelSinkProvider)

Inicializa uma nova instância da IpcClientChannel classe com as propriedades de configuração e o sink especificados.

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

Parâmetros

properties
IDictionary

Uma IDictionary coleção que especifica valores para propriedades de configuração a serem usadas pelo canal.

sinkProvider
IClientChannelSinkProvider

A IServerChannelSinkProvider implementação a ser usada pelo canal.

Exemplos

O seguinte exemplo de código mostra como usar este construtor.

// Create the client channel.
System::Collections::IDictionary^ properties = gcnew System::Collections::Hashtable;
properties->default[ L"name" ] = L"ipc client";
properties->default[ L"priority" ] = L"1";
IClientChannelSinkProvider^ sinkProvider = nullptr;
IpcClientChannel^ clientChannel = gcnew IpcClientChannel( properties,sinkProvider );
// Create the client channel.
System.Collections.IDictionary properties =
    new System.Collections.Hashtable();
properties["name"] = "ipc client";
properties["priority"] = "1";
System.Runtime.Remoting.Channels.IClientChannelSinkProvider
    sinkProvider = null;
IpcClientChannel clientChannel =
    new IpcClientChannel(properties, sinkProvider);

Observações

Para mais informações sobre as propriedades de configuração do canal, consulte Propriedades de Configuração de Canal e Formator.

Se não precisar de funcionalidade de sink, defina o sinkProvider parâmetro para null.

Ver também

Aplica-se a

IpcClientChannel(String, IClientChannelSinkProvider)

Inicializa uma nova instância da IpcClientChannel classe com o nome e o sumidouro especificados.

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

Parâmetros

name
String

O nome do canal.

sinkProvider
IClientChannelSinkProvider

A IClientChannelSinkProvider implementação a ser usada pelo canal.

Exemplos

O seguinte exemplo de código mostra como usar este construtor.

// Create the client channel.
String^ name = L"ipc client";
IClientChannelSinkProvider^ sinkProvider = nullptr;
IpcClientChannel^ clientChannel = gcnew IpcClientChannel( name,sinkProvider );
// Create the client channel.
string name = "ipc client";
System.Runtime.Remoting.Channels.IClientChannelSinkProvider
    sinkProvider = null;
IpcClientChannel clientChannel =
    new IpcClientChannel(name, sinkProvider);

Observações

Este construtor define a ChannelName propriedade usando o name parâmetro. Se quiser registar mais do que um canal, cada canal deve ter um nome único.

Se não precisar de funcionalidade de sink, defina o sinkProvider parâmetro para null.

Aplica-se a