WebRequest.CreatorInstance Propriedade

Definição

Cuidado

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

Quando substituído em uma classe descendente, obtém o objeto de fábrica derivado da classe IWebRequestCreate usada para criar o WebRequest instanciado para criar a solicitação para o URI especificado.When overridden in a descendant class, gets the factory object derived from the IWebRequestCreate class used to create the WebRequest instantiated for making the request to the specified URI.

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

Valor da propriedade

IWebRequestCreate

O WebRequest tipo derivado retornado pelo Create(Uri) método.The derived WebRequest type returned by the Create(Uri) method.

Atributos

Comentários

Essa propriedade permite que um aplicativo determine qual IWebRequestCreate objeto de fábrica derivado foi usado para criar a solicitação.This property allows an application to determine which IWebRequestCreate derived factory object was used to create the request. Esse objeto pode ser System .net. browser. WebRequestCreator. BrowserHttp ou System .net. browser. WebRequestCreator. ClientHttp, mas também pode ser uma instância personalizada derivada de IWebRequestCreate .This object may be System.Net.Browser.WebRequestCreator.BrowserHttp or System.Net.Browser.WebRequestCreator.ClientHttp, but it may also be a custom instance derived from IWebRequestCreate. Isso permite que um aplicativo determine se o navegador que hospeda o Silverlight, o cliente Silverlight ou algum objeto personalizado manipula solicitações HTTP e respostas para a WebRequest instância.This allows an application to determine whether the browser hosting Silverlight, the Silverlight client, or some custom object handles HTTP requests and responses for the WebRequest instance. O RegisterPrefix método permite que um aplicativo configure qual WebRequest tipo derivado será instanciado ao fazer uma solicitação para um URI específico.The RegisterPrefix method allows an application to configure which derived WebRequest type will be instantiated when making a request to a specific URI. WebRequest os criadores normalmente são registrados para lidar com um protocolo específico, como HTTP ou HTTPS, mas podem ser registrados para lidar com uma solicitação para um servidor ou caminho específico em um servidor.WebRequest creators are typically registered to handle a specific protocol, such HTTP or HTTPS, but can be registered to handle a request to a specific server or path on a server. Isso é útil quando mais de um WebRequest tipo derivado pode processar solicitações para o mesmo protocolo.This is useful when more than one derived WebRequest type can process requests for the same protocol. O tempo de execução do Microsoft Silverlight 3 e posterior dá suporte a vários manipuladores HTTP, cada um com recursos diferentes.The Microsoft Silverlight 3 and later runtime supports multiple HTTP handlers each having different capabilities. Por exemplo, um serviço Web que usa a transferência de estado de reapresentação (REST) pode exigir o manipulador do sistema .net. browser. WebRequestCreator. ClientHttp enquanto um serviço Web SOAP pode ser capaz de usar o manipulador padrão .net. browser. WebRequestCreator. BrowserHttp .For example, a web service that uses Representational State Transfer (REST) might require the System.Net.Browser.WebRequestCreator.ClientHttp handler while a SOAP web service might be able to use the default System.Net.Browser.WebRequestCreator.BrowserHttp handler.

Aplica-se a