構成プロパティとシンクを指定して、HttpClientChannel クラスの新しいインスタンスを初期化します。
名前空間: System.Runtime.Remoting.Channels.Http
アセンブリ: System.Runtime.Remoting (system.runtime.remoting.dll 内)
構文
'宣言
Public Sub New ( _
properties As IDictionary, _
sinkProvider As IClientChannelSinkProvider _
)
'使用
Dim properties As IDictionary
Dim sinkProvider As IClientChannelSinkProvider
Dim instance As New HttpClientChannel(properties, sinkProvider)
public HttpClientChannel (
IDictionary properties,
IClientChannelSinkProvider sinkProvider
)
public:
HttpClientChannel (
IDictionary^ properties,
IClientChannelSinkProvider^ sinkProvider
)
public HttpClientChannel (
IDictionary properties,
IClientChannelSinkProvider sinkProvider
)
public function HttpClientChannel (
properties : IDictionary,
sinkProvider : IClientChannelSinkProvider
)
パラメータ
- properties
チャネルで使用される構成プロパティの値を指定する IDictionary コレクション。
- sinkProvider
チャネルによって使用される IClientChannelSinkProvider の実装。
例外
例外の種類 | 条件 |
---|---|
構成プロパティの書式が正しくありませんでした。 |
解説
チャネル構成プロパティの詳細については、「チャネルおよびフォーマッタの構成プロパティ」を参照してください。
シンク機能が不要な場合は、sinkProvider パラメータを null 参照 (Visual Basic では Nothing) に設定します。
使用例
このコンストラクタを使用するコードの例を次に示します。
// Create a client channel.
System.Collections.Hashtable properties =
new System.Collections.Hashtable();
properties["port"] = 9090;
IClientChannelSinkProvider sinkProvider = null;
HttpClientChannel clientChannel = new HttpClientChannel(
properties, sinkProvider);
// 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 );
.NET Framework のセキュリティ
- 直前の呼び出し元に対する完全な信頼。このメンバは、部分的に信頼されているコードから使用することはできません。詳細については、「」を参照してください。
プラットフォーム
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
バージョン情報
.NET Framework
サポート対象 : 2.0、1.1、1.0
参照
関連項目
HttpClientChannel クラス
HttpClientChannel メンバ
System.Runtime.Remoting.Channels.Http 名前空間