Aracılığıyla paylaş


WebOperationContext.IncomingResponse Özellik

Tanım

Alınan isteğin Web yanıt bağlamını alır.

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

Özellik Değeri

IncomingWebResponseContext

Bir IncomingWebResponseContext örnek.

Örnekler

Aşağıdaki kod, özelliğinden içerik uzunluğunun, içerik türünün ve durum kodunun nasıl alınacaklarını IncomingResponse gösterir.

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)

Şunlara uygulanır