ChannelDispatcherBase.Detach(ServiceHostBase) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
When overridden in a derived class, detaches the channel dispatcher from a specific host.
protected:
virtual void Detach(System::ServiceModel::ServiceHostBase ^ host);
protected virtual void Detach (System.ServiceModel.ServiceHostBase host);
abstract member Detach : System.ServiceModel.ServiceHostBase -> unit
override this.Detach : System.ServiceModel.ServiceHostBase -> unit
Protected Overridable Sub Detach (host As ServiceHostBase)
Parameters
- host
- ServiceHostBase
The ServiceHostBase.
Exceptions
host
is null
.
The communication object is in a Faulted state.
Remarks
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.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om