ChannelDispatcherBase::Detach Method (ServiceHostBase^)
.NET Framework (current version)
When overridden in a derived class, detaches the channel dispatcher from a specific host.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
Parameters
- host
-
Type:
System.ServiceModel::ServiceHostBase^
The ServiceHostBase.
| Exception | Condition |
|---|---|
| ArgumentNullException | host is null. |
| InvalidOperationException | |
| ObjectDisposedException | |
| CommunicationObjectFaultedException | The communication object is in a Faulted state. |
The ServiceHostBase can only be detached when the instance of the ChannelDispatcher is in the Created state, as this is the only state that is both mutable and not disposed.
Should set the ServiceHostBase associated with the channel dispatcher to null.
ServiceHost calls this method when the ChannelDispatcherBase is removed from its ChannelDispatchers collection. This gives the ChannelDispatcherBase a chance to unhook events and inspect the ServiceHost.
.NET Framework
Available since 3.0
Available since 3.0
Show: