WebOperationContext.Current Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the current Web operation context.
public:
static property System::ServiceModel::Web::WebOperationContext ^ Current { System::ServiceModel::Web::WebOperationContext ^ get(); };
public static System.ServiceModel.Web.WebOperationContext Current { get; }
static member Current : System.ServiceModel.Web.WebOperationContext
Public Shared ReadOnly Property Current As WebOperationContext
Property Value
A WebOperationContext instance.
Examples
The following code shows how to access the current WebOperationContext instance.
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
Applies to
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.