ChannelFactoryBase<TChannel>.OnClose(TimeSpan) 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.
Closes all the channels associated with the channel factory within a specified interval of time.
protected:
override void OnClose(TimeSpan timeout);
protected override void OnClose (TimeSpan timeout);
override this.OnClose : TimeSpan -> unit
Protected Overrides Sub OnClose (timeout As TimeSpan)
Parameters
- timeout
- TimeSpan
The TimeSpan that specifies how long the on-close operation has to complete before timing out.
Remarks
This method sequentially attempts to close all of the active channels associated with the channel factory in no particular order. The timeout parameter is the cumulative amount of time available for closing all of the channels. If a graceful close of one of the channels fails (for example, if the channel is faulted causing an exception to be thrown) then this operation fails and does not attempt to close the remaining channels. Failure in this method causes the factory and any remaining channels to be aborted rather than closed.
This method is called by Close.
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應