Partage via


IpcClientChannel Constructeurs

Définition

Initialise une nouvelle instance de la classe IpcServerChannel.

Surcharges

IpcClientChannel()

Initialise une nouvelle instance de la classe IpcServerChannel.

IpcClientChannel(IDictionary, IClientChannelSinkProvider)

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

IpcClientChannel(String, IClientChannelSinkProvider)

Initialise une nouvelle instance de la classe IpcClientChannel 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 montre la valeur par défaut pour chaque propriété de configuration.

Propriété 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 classe IpcClientChannel 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 devant être utilisées par le canal.

sinkProvider
IClientChannelSinkProvider

Implémentation de IServerChannelSinkProvider devant être utilisée 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 la fonctionnalité récepteur, définissez le paramètre sur sinkProvidernull.

Voir aussi

S’applique à

IpcClientChannel(String, IClientChannelSinkProvider)

Initialise une nouvelle instance de la classe IpcClientChannel 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 de IClientChannelSinkProvider devant être utilisée 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 propriété à l’aide ChannelName du name paramètre . Si vous souhaitez inscrire plusieurs canaux, chaque canal doit avoir un nom unique.

Si vous n’avez pas besoin de la fonctionnalité récepteur, définissez le paramètre sur sinkProvidernull.

S’applique à