ServiceHostBase.OnClose(TimeSpan) 方法

定義

關閉裝載的服務,包括其通道發送器以及相關執行個體內容和接聽程式。Closes down the hosted service, including their channel dispatchers and associated instance contexts and listeners.

protected:
 override void OnClose(TimeSpan timeout);
protected override void OnClose (TimeSpan timeout);
override this.OnClose : TimeSpan -> unit
Protected Overrides Sub OnClose (timeout As TimeSpan)

參數

timeout
TimeSpan

指定必須在逾時前完成關閉作業之寬限時間的 TimeSpanThe TimeSpan that specifies how long the on-close operation has to complete before timing out.

備註

呼叫 OnClose(TimeSpan) 會執行下列動作:Calling OnClose(TimeSpan) does the following:

適用於