IpcServerChannel Construtores

Definição

Inicializa uma nova instância da IpcServerChannel classe.

Sobrecargas

Name Description
IpcServerChannel(String)

Inicializa uma nova instância da IpcServerChannel classe com o nome da porta IPC especificado.

IpcServerChannel(IDictionary, IServerChannelSinkProvider)

Inicializa uma nova instância da IpcServerChannel classe com as propriedades do canal e o sumidouro especificados.

IpcServerChannel(String, String)

Inicializa uma nova instância da IpcServerChannel classe com o nome do canal especificado e o nome da porta IPC.

IpcServerChannel(IDictionary, IServerChannelSinkProvider, CommonSecurityDescriptor)

Inicializa uma nova instância da IpcServerChannel classe com as propriedades do canal especificadas, o sumidouro e o descritor de segurança.

IpcServerChannel(String, String, IServerChannelSinkProvider)

Inicializa uma nova instância da IpcServerChannel classe com o nome do canal, nome da porta IPC e sumidouro especificados.

IpcServerChannel(String)

Inicializa uma nova instância da IpcServerChannel classe com o nome da porta IPC especificado.

public:
 IpcServerChannel(System::String ^ portName);
public IpcServerChannel(string portName);
new System.Runtime.Remoting.Channels.Ipc.IpcServerChannel : string -> System.Runtime.Remoting.Channels.Ipc.IpcServerChannel
Public Sub New (portName As String)

Parâmetros

portName
String

O nome da porta IPC a ser usada pelo canal.

Exemplos

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

// Create and register an IPC channel
IpcServerChannel^ serverChannel = gcnew IpcServerChannel( L"remote" );
ChannelServices::RegisterChannel( serverChannel );
// Create and register an IPC channel
IpcServerChannel serverChannel = new IpcServerChannel("remote");
ChannelServices.RegisterChannel(serverChannel);

Aplica-se a

IpcServerChannel(IDictionary, IServerChannelSinkProvider)

Inicializa uma nova instância da IpcServerChannel classe com as propriedades do canal e o sumidouro especificados.

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

Parâmetros

properties
IDictionary

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

sinkProvider
IServerChannelSinkProvider

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

Exemplos

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

// Create the server channel.
System::Collections::IDictionary^ properties = gcnew System::Collections::Hashtable;
properties->default[ L"name" ] = L"ipc";
properties->default[ L"priority" ] = L"20";
properties->default[ L"portName" ] = L"localhost:9090";
IpcServerChannel^ serverChannel = gcnew IpcServerChannel( properties, nullptr );
// Create the server channel.
System.Collections.IDictionary properties =
    new System.Collections.Hashtable();
properties["name"] = "ipc";
properties["priority"] = "20";
properties["portName"] = "localhost:9090";
IpcServerChannel serverChannel =
    new IpcServerChannel(properties, null);

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.

Atenção

Ao definir a exclusiveAddressUse propriedade como false no properties argumento, vários IpcServerChannel objetos podem ser registados para o mesmo pipe nomeado. Nesse caso, os pedidos podem ir para qualquer um dos canais registados. Esta configuração é considerada segura apenas se também forem usados ALCs.

Ver também

Aplica-se a

IpcServerChannel(String, String)

Inicializa uma nova instância da IpcServerChannel classe com o nome do canal especificado e o nome da porta IPC.

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

Parâmetros

name
String

O nome do canal.

portName
String

O nome da porta IPC a ser usada pelo canal.

Exemplos

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

// Create the server channel.
String^ name = L"ipc";
String^ portName = L"localhost:9090";
IpcServerChannel^ serverChannel = gcnew IpcServerChannel( name,portName );
// Create the server channel.
string name = "ipc";
string portName = "localhost:9090";
IpcServerChannel serverChannel =
    new IpcServerChannel(name, portName);

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.

Aplica-se a

IpcServerChannel(IDictionary, IServerChannelSinkProvider, CommonSecurityDescriptor)

Inicializa uma nova instância da IpcServerChannel classe com as propriedades do canal especificadas, o sumidouro e o descritor de segurança.

public:
 IpcServerChannel(System::Collections::IDictionary ^ properties, System::Runtime::Remoting::Channels::IServerChannelSinkProvider ^ sinkProvider, System::Security::AccessControl::CommonSecurityDescriptor ^ securityDescriptor);
public IpcServerChannel(System.Collections.IDictionary properties, System.Runtime.Remoting.Channels.IServerChannelSinkProvider sinkProvider, System.Security.AccessControl.CommonSecurityDescriptor securityDescriptor);
new System.Runtime.Remoting.Channels.Ipc.IpcServerChannel : System.Collections.IDictionary * System.Runtime.Remoting.Channels.IServerChannelSinkProvider * System.Security.AccessControl.CommonSecurityDescriptor -> System.Runtime.Remoting.Channels.Ipc.IpcServerChannel
Public Sub New (properties As IDictionary, sinkProvider As IServerChannelSinkProvider, securityDescriptor As CommonSecurityDescriptor)

Parâmetros

properties
IDictionary

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

sinkProvider
IServerChannelSinkProvider

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

securityDescriptor
CommonSecurityDescriptor

A CommonSecurityDescriptor para ser usado pelo canal.

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. Se não precisar de um descritor de segurança, defina o securityDescriptor parâmetro para null.

Atenção

Ao definir a exclusiveAddressUse propriedade como false no properties argumento, vários IpcServerChannel objetos podem ser registados para o mesmo pipe nomeado. Nesse caso, os pedidos podem ir para qualquer um dos canais registados. Esta configuração é considerada segura apenas se também forem usados ALCs.

Ver também

Aplica-se a

IpcServerChannel(String, String, IServerChannelSinkProvider)

Inicializa uma nova instância da IpcServerChannel classe com o nome do canal, nome da porta IPC e sumidouro especificados.

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

Parâmetros

name
String

O nome do canal.

portName
String

O nome da porta IPC a ser usada pelo canal.

sinkProvider
IServerChannelSinkProvider

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

Exemplos

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

// Create the server channel.
String^ name = L"ipc";
String^ portName = L"localhost:9090";
IServerChannelSinkProvider^ sinkProvider = nullptr;
IpcServerChannel^ serverChannel = gcnew IpcServerChannel( name,portName,sinkProvider );
// Create the server channel.
string name = "ipc";
string portName = "localhost:9090";
IServerChannelSinkProvider sinkProvider = null;
IpcServerChannel serverChannel =
    new IpcServerChannel(name, portName, 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