ServiceHostBase::OnClose Method (TimeSpan)
.NET Framework (current version)
Closes down the hosted service, including their channel dispatchers and associated instance contexts and listeners.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
Calling OnClose(TimeSpan) does the following:
Closes all input to ChannelDispatcher, which also closes their associated IChannelListener instances. This stops any new channels from being accepting.
Calls CloseInput on all InstanceContext objects, which mean they stop accepting new messages.
Waits for all InstanceContext objects to close down, which happens when their associated channels finish sending all pending messages.
Closes the ChannelDispatcher objects associated with the host.
.NET Framework
Available since 3.0
Available since 3.0
Show: