ChannelDispatcher.Attach(ServiceHostBase) 方法

定義

將通道發送器附加至主機。

protected:
 override void Attach(System::ServiceModel::ServiceHostBase ^ host);
protected override void Attach (System.ServiceModel.ServiceHostBase host);
override this.Attach : System.ServiceModel.ServiceHostBase -> unit
Protected Overrides Sub Attach (host As ServiceHostBase)

參數

host
ServiceHostBase

服務的 ServiceHostBase

例外狀況

通訊物件處於 OpeningOpened 狀態中。

通訊物件處於 ClosingClosed 狀態中。

通訊物件處於 Faulted 狀態中。

備註

只有在 ChannelDispatcher 的執行個體處於 Created 狀態時才可以設定這個屬性,因為這是唯一同時處於可變動且尚未處置的狀態。

適用於