HttpClientChannel Constructor (IDictionary, IClientChannelSinkProvider)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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

Namespace:   System.Runtime.Remoting.Channels.Http
Assembly:  System.Runtime.Remoting (in System.Runtime.Remoting.dll)

public HttpClientChannel(
	IDictionary properties,
	IClientChannelSinkProvider sinkProvider
)

Parameters

properties
Type: System.Collections.IDictionary

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

sinkProvider
Type: System.Runtime.Remoting.Channels.IClientChannelSinkProvider

The IClientChannelSinkProvider implementation to be used by the channel.

Exception Condition
ArgumentException

A configuration property was incorrectly formatted.

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.

The following code example shows how to use this constructor.

// Create a client channel.
System.Collections.Hashtable properties =
    new System.Collections.Hashtable();
properties["port"] = 9090;
IClientChannelSinkProvider sinkProvider = null;
HttpClientChannel clientChannel = new HttpClientChannel(
    properties, sinkProvider);

.NET Framework
Available since 1.1
Return to top
Show: