InstanceContext Constructor (Object^)
.NET Framework (current version)
Initializes a new instance of the InstanceContext class for a specified object that implements the service instance.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
Parameters
- implementation
-
Type:
System::Object^
The object that implements the service instance.
This sets the service host associated with the instance context to null.
The following code shows how to construct an InstanceContext object by passing in a ServiceHost instance:
string info = ""; InstanceContext instanceContext = new InstanceContext(serviceHost); info += " " + "State: " + instanceContext.State.ToString() + "\n"; info += " " + "ManualFlowControlLimit: " + instanceContext.ManualFlowControlLimit.ToString() + "\n"; info += " " + "HashCode: " + instanceContext.GetHashCode().ToString() + "\n"; Console.WriteLine(info);
Universal Windows Platform
Available since 8
.NET Framework
Available since 3.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 3.0
Available since 8
.NET Framework
Available since 3.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 3.0
Show: