WebRequest.CreatorInstance プロパティ

定義

注意事項

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

派生クラスでオーバーライドされると、IWebRequestCreate クラスから派生するファクトリ オブジェクトを取得します。このクラスは、指定 URI に対して要求を行うためにインスタンス化される 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 クライアント、または一部のカスタム オブジェクトがインスタンスの HTTP 要求と応答を WebRequest 処理するかどうかを判断できます。 RegisterPrefixメソッドを使用すると、アプリケーションは、特定の WebRequest URI に対する要求を行うときにインスタンス化される派生型を構成できます。 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 ハンドラーを 使用できる場合があります。

適用対象