BasicDesignerLoader.OnEndLoad(Boolean, ICollection) 方法

定義

通知設計載入器載入完成。

protected:
 virtual void OnEndLoad(bool successful, System::Collections::ICollection ^ errors);
protected virtual void OnEndLoad(bool successful, System.Collections.ICollection errors);
abstract member OnEndLoad : bool * System.Collections.ICollection -> unit
override this.OnEndLoad : bool * System.Collections.ICollection -> unit
Protected Overridable Sub OnEndLoad (successful As Boolean, errors As ICollection)

參數

successful
Boolean

true若貨物成功完成;否則,。 false

errors
ICollection

包含 ICollection 被報告為錯誤的物件(通常是例外)。

例外狀況

這些 IDesignerLoaderHost 已經被處理掉了。

備註

當載入完成時會啟動此 OnEndLoad 方法。 即使載入時拋出例外,也會被呼叫。 successful值會設定為true負載成功或false發生致命錯誤時。 該 errors 集合將包含被報告為錯誤的物件。 通常,這些物件是例外。

如果你實作IDesignerLoaderService是提供依賴負載支援,應該在最後一次呼叫IDesignerLoaderService.DependentLoadComplete該方法後呼叫該OnEndLoad方法。 預設情況下, BasicDesignerLoader 它會 IDesignerLoaderService 幫你實作並執行這件事。 若IDesignerLoaderService在呼叫時BeginLoad無法使用,BeginLoad則在呼叫PerformLoad後會直接呼叫OnEndLoad

當所有相依載入完成後,設計載入服務應呼叫此方法。 這會停止由 BeginLoad 該方法啟動的載入過程。 如果您自行提供裝載服務,或選擇不提供裝載服務,您需負責撥打此方法。 BeginLoad方法會自動呼叫此值,若有方法則間接呼叫,若無法使用則直接呼叫IDesignerLoaderService.DependentLoadCompleteIDesignerLoaderService

適用於