WebOperationContext.IncomingResponse Свойство

Определение

Возвращает контекст веб-ответа для получаемого запроса.

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

Значение свойства

IncomingWebResponseContext

Экземпляр IncomingWebResponseContext.

Примеры

Следующий пример кода демонстрирует, как получить значения Content-Length, Content-Type и Status из свойства IncomingResponse.

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)

Применяется к