Langue

IpcClientChannel Constructeurs

Définition

Initialise une nouvelle instance de la classe IpcServerChannel.

Surcharges

Nom Description
IpcClientChannel()

Initialise une nouvelle instance de la classe IpcServerChannel.

IpcClientChannel(IDictionary, IClientChannelSinkProvider)

Initialise une nouvelle instance de la IpcClientChannel classe avec les propriétés de configuration et le récepteur spécifiés.

IpcClientChannel(String, IClientChannelSinkProvider)

Initialise une nouvelle instance de la IpcClientChannel classe avec le nom et le récepteur spécifiés.

IpcClientChannel()

Initialise une nouvelle instance de la classe IpcServerChannel.

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

Exemples

L’exemple de code suivant montre comment utiliser ce constructeur.

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

Remarques

Les propriétés de configuration de l’instance TcpClientChannel retournée par ce constructeur sont toutes définies sur leurs valeurs par défaut. Le tableau suivant indique la valeur par défaut de chaque propriété de configuration.

Propriété de configuration Description
name Le nom par défaut est « client ipc ». Chaque canal doit avoir un nom unique.
priority La priorité par défaut est 1.

S’applique à

IpcClientChannel(IDictionary, IClientChannelSinkProvider)

Initialise une nouvelle instance de la IpcClientChannel classe avec les propriétés de configuration et le récepteur spécifiés.

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)

Paramètres

properties
IDictionary

Collection IDictionary qui spécifie les valeurs des propriétés de configuration à utiliser par le canal.

sinkProvider
IClientChannelSinkProvider

Implémentation IServerChannelSinkProvider à utiliser par le canal.

Exemples

L’exemple de code suivant montre comment utiliser ce constructeur.

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

Remarques

Pour plus d’informations sur les propriétés de configuration de canal, consultez Propriétés de configuration du canal et du formateur.

Si vous n’avez pas besoin de fonctionnalités de récepteur, définissez le sinkProvider paramètre nullsur .

Voir aussi

S’applique à

IpcClientChannel(String, IClientChannelSinkProvider)

Initialise une nouvelle instance de la IpcClientChannel classe avec le nom et le récepteur spécifiés.

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)

Paramètres

name
String

Nom du canal.

sinkProvider
IClientChannelSinkProvider

Implémentation IClientChannelSinkProvider à utiliser par le canal.

Exemples

L’exemple de code suivant montre comment utiliser ce constructeur.

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

Remarques

Ce constructeur définit la ChannelName propriété à l’aide du name paramètre. Si vous souhaitez inscrire plusieurs canaux, chaque canal doit avoir un nom unique.

Si vous n’avez pas besoin de fonctionnalités de récepteur, définissez le sinkProvider paramètre nullsur .

S’applique à