Condividi tramite


IpcClientChannel Costruttori

Definizione

Inizializza una nuova istanza della classe IpcServerChannel.

Overload

Nome Descrizione
IpcClientChannel()

Inizializza una nuova istanza della classe IpcServerChannel.

IpcClientChannel(IDictionary, IClientChannelSinkProvider)

Inizializza una nuova istanza della IpcClientChannel classe con le proprietà di configurazione e il sink specificati.

IpcClientChannel(String, IClientChannelSinkProvider)

Inizializza una nuova istanza della IpcClientChannel classe con il nome e il sink specificati.

IpcClientChannel()

Inizializza una nuova istanza della classe IpcServerChannel.

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

Esempio

Nell'esempio di codice seguente viene illustrato come usare questo costruttore.

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

Commenti

Le proprietà di configurazione dell'istanza TcpClientChannel restituita da questo costruttore sono tutte impostate sui valori predefiniti. Nella tabella seguente viene illustrato il valore predefinito per ogni proprietà di configurazione.

Proprietà di configurazione Descrizione
name Il nome predefinito è "ipc client". Ogni canale deve avere un nome univoco.
priority La priorità predefinita è 1.

Si applica a

IpcClientChannel(IDictionary, IClientChannelSinkProvider)

Inizializza una nuova istanza della IpcClientChannel classe con le proprietà di configurazione e il sink specificati.

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)

Parametri

properties
IDictionary

Raccolta IDictionary che specifica i valori per le proprietà di configurazione da utilizzare dal canale.

sinkProvider
IClientChannelSinkProvider

Implementazione IServerChannelSinkProvider da usare dal canale.

Esempio

Nell'esempio di codice seguente viene illustrato come usare questo costruttore.

// 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);

Commenti

Per altre informazioni sulle proprietà di configurazione del canale, vedere Proprietà di configurazione del canale e del formattatore.

Se non è necessaria la funzionalità sink, impostare il sinkProvider parametro su null.

Vedi anche

Si applica a

IpcClientChannel(String, IClientChannelSinkProvider)

Inizializza una nuova istanza della IpcClientChannel classe con il nome e il sink specificati.

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)

Parametri

name
String

Nome del canale.

sinkProvider
IClientChannelSinkProvider

Implementazione IClientChannelSinkProvider da usare dal canale.

Esempio

Nell'esempio di codice seguente viene illustrato come usare questo costruttore.

// 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);

Commenti

Questo costruttore imposta la ChannelName proprietà utilizzando il name parametro . Se si desidera registrare più canali, ogni canale deve avere un nome univoco.

Se non è necessaria la funzionalità sink, impostare il sinkProvider parametro su null.

Si applica a