다음을 통해 공유


WebOperationContext.Current 속성

정의

현재 웹 작업 컨텍스트를 가져옵니다.

public:
 static property System::ServiceModel::Web::WebOperationContext ^ Current { System::ServiceModel::Web::WebOperationContext ^ get(); };
public static System.ServiceModel.Web.WebOperationContext Current { get; }
member this.Current : System.ServiceModel.Web.WebOperationContext
Public Shared ReadOnly Property Current As WebOperationContext

속성 값

WebOperationContext

WebOperationContext 인스턴스입니다.

예제

다음 코드는 현재 WebOperationContext 인스턴스에 액세스하는 방법을 보여줍니다.

WebOperationContext current = WebOperationContext.Current;
WebHeaderCollection headers = current.IncomingRequest.Headers;

foreach (string name in headers)
{
    Console.WriteLine(name + " " + headers.Get(name));
}
Dim current As WebOperationContext = WebOperationContext.Current
Dim headers As WebHeaderCollection = current.IncomingRequest.Headers

For Each name As String In headers
    Console.WriteLine(name + " " + headers.Get(name))
Next

적용 대상