IpcClientChannel Constructors

Definition

Initializes a new instance of the IpcServerChannel class.

Overloads

IpcClientChannel()

Initializes a new instance of the IpcServerChannel class.

IpcClientChannel(IDictionary, IClientChannelSinkProvider)

Initializes a new instance of the IpcClientChannel class with the specified configuration properties and sink.

IpcClientChannel(String, IClientChannelSinkProvider)

Initializes a new instance of the IpcClientChannel class with the specified name and sink.

IpcClientChannel()

Initializes a new instance of the IpcServerChannel class.

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

Examples

The following code example shows how to use this constructor.

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

Remarks

The configuration properties of the TcpClientChannel instance returned by this constructor are all set to their default values. The following table shows the default value for each configuration property.

Configuration property Description
name The default name is "ipc client". Each channel must have a unique name.
priority The default priority is 1.

Applies to

IpcClientChannel(IDictionary, IClientChannelSinkProvider)

Initializes a new instance of the IpcClientChannel class with the specified configuration properties and sink.

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)

Parameters

properties
IDictionary

A IDictionary collection that specifies values for configuration properties to be used by the channel.

sinkProvider
IClientChannelSinkProvider

The IServerChannelSinkProvider implementation to be used by the channel.

Examples

The following code example shows how to use this constructor.

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

Remarks

For more information about channel configuration properties, see Channel and Formatter Configuration Properties.

If you do not require sink functionality, set the sinkProvider parameter to null.

See also

Applies to

IpcClientChannel(String, IClientChannelSinkProvider)

Initializes a new instance of the IpcClientChannel class with the specified name and sink.

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)

Parameters

name
String

The name of the channel.

sinkProvider
IClientChannelSinkProvider

The IClientChannelSinkProvider implementation to be used by the channel.

Examples

The following code example shows how to use this constructor.

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

Remarks

This constructor sets the ChannelName property by using the name parameter. If you want to register more than one channel, each channel must have a unique name.

If you do not require sink functionality, set the sinkProvider parameter to null.

Applies to