Freigeben über


WebOperationContext.IncomingResponse Eigenschaft

Definition

Ruft den Webantwortkontext für die empfangene Anforderung ab.

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

Eigenschaftswert

IncomingWebResponseContext

Eine IncomingWebResponseContext-Instanz.

Beispiele

Im folgenden Code wird das Abrufen von Inhaltslänge, Inhaltstyp und Statuscode aus der IncomingResponse-Eigenschaft veranschaulicht.

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)

Gilt für