次の方法で共有


WebRequest.CreatorInstance プロパティ

定義

注意事項

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

子孫クラスでオーバーライドされると、指定した URI への要求を行うためにインスタンス化されたIWebRequestCreateを作成するために使用されるWebRequest クラスから派生したファクトリ オブジェクトを取得します。

public:
 virtual property System::Net::IWebRequestCreate ^ CreatorInstance { System::Net::IWebRequestCreate ^ get(); };
[System.Obsolete("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.", true)]
public virtual System.Net.IWebRequestCreate CreatorInstance { get; }
[<System.Obsolete("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.", true)>]
member this.CreatorInstance : System.Net.IWebRequestCreate
Public Overridable ReadOnly Property CreatorInstance As IWebRequestCreate

プロパティ値

Create(Uri) メソッドによって返される派生WebRequest型。

属性

注釈

このプロパティを使用すると、アプリケーションは、どの IWebRequestCreate 派生ファクトリ オブジェクトが要求の作成に使用されたかを判断できます。 このオブジェクトは System.Net.Browser.WebRequestCreator.BrowserHttp) または System.Net.Browser.WebRequestCreator.ClientHttp) でもかまいませんが、 IWebRequestCreateから派生したカスタム インスタンスである場合もあります。 これにより、アプリケーションは、Silverlight、Silverlight クライアント、または一部のカスタム オブジェクトをホストしているブラウザーが、 WebRequest インスタンスの HTTP 要求と応答を処理するかどうかを判断できます。 RegisterPrefix メソッドを使用すると、特定の URI に対する要求を行うときにインスタンス化される派生WebRequest型をアプリケーションで構成できます。 WebRequest 作成者は通常、HTTP や HTTPS などの特定のプロトコルを処理するように登録されますが、サーバー上の特定のサーバーまたはパスへの要求を処理するように登録できます。 これは、複数の派生 WebRequest 型が同じプロトコルの要求を処理できる場合に便利です。 Microsoft Silverlight 3 以降のランタイムでは、それぞれ異なる機能を持つ複数の HTTP ハンドラーがサポートされています。 たとえば、Representational State Transfer (REST) を使用する Web サービスでは System.Net.Browser.WebRequestCreator.ClientHttp) ハンドラーが必要になる場合があります。SOAP Web サービスでは既定の System.Net.Browser.WebRequestCreator.BrowserHttp) ハンドラーを使用できる場合があります。

適用対象