Partilhar via


WebOperationContext.IncomingResponse Propriedade

Definição

Obtém o contexto da resposta Web para a solicitação que está sendo recebida.

public:
 property System::ServiceModel::Web::IncomingWebResponseContext ^ IncomingResponse { System::ServiceModel::Web::IncomingWebResponseContext ^ get(); };
public System.ServiceModel.Web.IncomingWebResponseContext IncomingResponse { get; }
member this.IncomingResponse : System.ServiceModel.Web.IncomingWebResponseContext
Public ReadOnly Property IncomingResponse As IncomingWebResponseContext

Valor da propriedade

IncomingWebResponseContext

Uma instância IncomingWebResponseContext.

Exemplos

O código a seguir mostra como obter o comprimento do conteúdo, o tipo de conteúdo e o código de status da IncomingResponse propriedade.

WebOperationContext current = WebOperationContext.Current;
Console.WriteLine("Incoming Response");
Console.WriteLine("ContentLength: " + current.IncomingResponse.ContentLength);
Console.WriteLine("ContentType: " + current.IncomingResponse.ContentType);
Console.WriteLine("StatusCode: " + current.IncomingResponse.StatusCode);
Dim current As WebOperationContext = WebOperationContext.Current
Console.WriteLine("Incoming Response")
Console.WriteLine("ContentLength: " + current.IncomingResponse.ContentLength)
Console.WriteLine("ContentType: " + current.IncomingResponse.ContentType)
Console.WriteLine("StatusCode: " + current.IncomingResponse.StatusCode)

Aplica-se a