Share via


HttpClientChannel コンストラクター

定義

HttpClientChannel クラスの新しいインスタンスを初期化します。

オーバーロード

HttpClientChannel()

HttpClientChannel クラスの新しいインスタンスを初期化します。

HttpClientChannel(IDictionary, IClientChannelSinkProvider)

構成プロパティとシンクを指定して、HttpClientChannel クラスの新しいインスタンスを初期化します。

HttpClientChannel(String, IClientChannelSinkProvider)

名前とシンクを指定して、HttpClientChannel クラスの新しいインスタンスを初期化します。

HttpClientChannel()

HttpClientChannel クラスの新しいインスタンスを初期化します。

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

注釈

このコンストラクターによって返されるインスタンスの HttpClientChannel 構成プロパティはすべて、既定値に設定されます。

適用対象

HttpClientChannel(IDictionary, IClientChannelSinkProvider)

構成プロパティとシンクを指定して、HttpClientChannel クラスの新しいインスタンスを初期化します。

public:
 HttpClientChannel(System::Collections::IDictionary ^ properties, System::Runtime::Remoting::Channels::IClientChannelSinkProvider ^ sinkProvider);
public HttpClientChannel (System.Collections.IDictionary properties, System.Runtime.Remoting.Channels.IClientChannelSinkProvider sinkProvider);
new System.Runtime.Remoting.Channels.Http.HttpClientChannel : System.Collections.IDictionary * System.Runtime.Remoting.Channels.IClientChannelSinkProvider -> System.Runtime.Remoting.Channels.Http.HttpClientChannel
Public Sub New (properties As IDictionary, sinkProvider As IClientChannelSinkProvider)

パラメーター

properties
IDictionary

チャネルで使用される構成プロパティの値を指定する IDictionary コレクション。

sinkProvider
IClientChannelSinkProvider

チャネルによって使用される IClientChannelSinkProvider の実装。

例外

構成プロパティの書式が正しくありませんでした。

次のコード例は、このコンストラクターの使用方法を示しています。

// Create a client channel.
System::Collections::Hashtable^ properties = gcnew System::Collections::Hashtable;
properties->default[ L"port" ] = 9090;
IClientChannelSinkProvider^ sinkProvider = nullptr;
HttpClientChannel^ clientChannel = gcnew HttpClientChannel( properties,sinkProvider );
// Create a client channel.
System.Collections.Hashtable properties =
    new System.Collections.Hashtable();
properties["port"] = 9090;
IClientChannelSinkProvider sinkProvider = null;
HttpClientChannel clientChannel = new HttpClientChannel(
    properties, sinkProvider);

注釈

チャネル構成プロパティの詳細については、「 チャネルとフォーマッタの構成プロパティ」を参照してください。

シンク機能が必要ない場合は、 パラメーターを sinkProvidernull設定します。

こちらもご覧ください

適用対象

HttpClientChannel(String, IClientChannelSinkProvider)

名前とシンクを指定して、HttpClientChannel クラスの新しいインスタンスを初期化します。

public:
 HttpClientChannel(System::String ^ name, System::Runtime::Remoting::Channels::IClientChannelSinkProvider ^ sinkProvider);
public HttpClientChannel (string name, System.Runtime.Remoting.Channels.IClientChannelSinkProvider sinkProvider);
new System.Runtime.Remoting.Channels.Http.HttpClientChannel : string * System.Runtime.Remoting.Channels.IClientChannelSinkProvider -> System.Runtime.Remoting.Channels.Http.HttpClientChannel
Public Sub New (name As String, sinkProvider As IClientChannelSinkProvider)

パラメーター

name
String

HttpClientChannel の新規インスタンスの名前。

sinkProvider
IClientChannelSinkProvider

チャネルによって使用される IClientChannelSinkProvider

次のコード例は、このコンストラクターの使用方法を示しています。

// Create a client channel.
String^ name = L"RemotingClient";
IClientChannelSinkProvider^ sinkProvider = nullptr;
HttpClientChannel^ clientChannel = gcnew HttpClientChannel( name,sinkProvider );
// Create a client channel.
string name = "RemotingClient";
IClientChannelSinkProvider sinkProvider = null;
HttpClientChannel clientChannel = new HttpClientChannel(name,
    sinkProvider);

注釈

このコンストラクターは、 パラメーターを ChannelName 使用して プロパティを name 設定します。

適用対象