Share via


BasicDesignerLoader.OnEndLoad(Boolean, ICollection) 方法

定義

告知設計工具載入器已完成載入。

protected:
 virtual void OnEndLoad(bool successful, System::Collections::ICollection ^ errors);
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,包含錯誤物件 (通常為例外狀況)。

例外狀況

備註

OnEndLoad載入完成時會叫用 方法。 它一律會呼叫,即使載入期間擲回例外狀況也一樣。 如果負載成功,或false發生嚴重錯誤,則會successful將 的值設定true為 。 集合 errors 將包含回報為錯誤的物件。 這些物件通常是例外狀況。

如果您實IDesignerLoaderService作 以提供相依負載支援,則應該在最後一次IDesignerLoaderService.DependentLoadComplete呼叫 方法之後呼叫 OnEndLoad 方法。 根據預設, BasicDesignerLoader 會為您實作 IDesignerLoaderService 並執行此動作。 如果 IDesignerLoaderService 呼叫 時 BeginLoad 無法使用, BeginLoad 則會在呼叫 之後直接呼叫 OnEndLoadPerformLoad

當所有相依負載都已完成時,設計工具載入器服務應該呼叫這個方法。 這會停止 由 BeginLoad 方法起始的載入進程。 如果您提供自己的載入器服務,或如果您選擇不提供載入器服務,則您必須負責呼叫此方法。 如果BeginLoad可用,方法會自動呼叫此方法,IDesignerLoaderService.DependentLoadCompleteIDesignerLoaderService或是直接呼叫方法,或直接呼叫此方法。

適用於