OperationContext::Current Property

 

Gets or sets the execution context for the current thread.

Namespace:   System.ServiceModel
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public:
property OperationContext^ Current {
	static OperationContext^ get();
	static void set(OperationContext^ value);
}

Property Value

Type: System.ServiceModel::OperationContext^

The OperationContext that represents the messaging and execution context of the current method.

Use the Current property to obtain the execution and message context for the current method.

The following code example uses the Current property and GetCallbackChannel<T> method to create a channel back to the caller from within a method. All methods in this example are one-way methods, enabling the service and the client to communicate in both directions independently. In this case, the example client application expects only one return call before it exits, but another client, for example a Windows Forms client, can receive any number of calls from the service.

No code example is currently available or this language may not be supported.

Universal Windows Platform
Available since 8
.NET Framework
Available since 3.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show: