IpcClientChannel Construtores
Definição
Importante
Algumas informações se referem a produtos de pré-lançamento que podem ser substancialmente modificados antes do lançamento. A Microsoft não oferece garantias, expressas ou implícitas, das informações aqui fornecidas.
Inicializa uma nova instância da classe IpcServerChannel.
Sobrecargas
| Nome | Description |
|---|---|
| IpcClientChannel() |
Inicializa uma nova instância da classe IpcServerChannel. |
| IpcClientChannel(IDictionary, IClientChannelSinkProvider) |
Inicializa uma nova instância da IpcClientChannel classe com as propriedades de configuração e o coletor especificados. |
| IpcClientChannel(String, IClientChannelSinkProvider) |
Inicializa uma nova instância da IpcClientChannel classe com o nome e o coletor especificados. |
IpcClientChannel()
Inicializa uma nova instância da classe IpcServerChannel.
public:
IpcClientChannel();
public IpcClientChannel();
Public Sub New ()
Exemplos
O exemplo de código a seguir mostra como usar esse construtor.
IpcClientChannel^ clientChannel = gcnew IpcClientChannel;
ChannelServices::RegisterChannel( clientChannel );
IpcClientChannel clientChannel = new IpcClientChannel();
ChannelServices.RegisterChannel(clientChannel);
Comentários
As propriedades de configuração da TcpClientChannel instância retornada por esse construtor são definidas como seus valores padrão. A tabela a seguir 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 exclusivo. |
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 coletor 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 exemplo de código a seguir mostra como usar esse 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);
Comentários
Para obter mais informações sobre as propriedades de configuração de canal, consulte Propriedades de configuração de canal e de formatador.
Se você não precisar da funcionalidade do coletor, defina o sinkProvider parâmetro como null.
Confira também
Aplica-se a
IpcClientChannel(String, IClientChannelSinkProvider)
Inicializa uma nova instância da IpcClientChannel classe com o nome e o coletor 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 exemplo de código a seguir mostra como usar esse 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);
Comentários
Esse construtor define a ChannelName propriedade usando o name parâmetro. Se você quiser registrar mais de um canal, cada canal deverá ter um nome exclusivo.
Se você não precisar da funcionalidade do coletor, defina o sinkProvider parâmetro como null.