ChannelDispatcher::Detach Method (ServiceHostBase^)
.NET Framework (current version)
Detaches the service host from the channel dispatcher.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
Parameters
- host
-
Type:
System.ServiceModel::ServiceHostBase^
The ServiceHostBase for the service.
| Exception | Condition |
|---|---|
| ArgumentNullException | host is null. |
| InvalidOperationException | host is not the host of the channel dispatcher. |
| 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.
Sets the ServiceHostBase associated with the channel dispatcher to null.
.NET Framework
Available since 3.0
Available since 3.0
Show: