BasicDesignerLoader.OnEndLoad Method (Boolean, ICollection)

 

Notifies the designer loader that loading is complete.

Namespace:   System.ComponentModel.Design.Serialization
Assembly:  System.Design (in System.Design.dll)

protected virtual void OnEndLoad(
	bool successful,
	ICollection errors
)

Parameters

successful
Type: System.Boolean

true if the load completed successfully; otherwise, false.

errors
Type: System.Collections.ICollection

An ICollection containing objects (usually exceptions) that were reported as errors.

Exception Condition
InvalidOperationException

The IDesignerLoaderHost has not been initialized.

ObjectDisposedException

The IDesignerLoaderHost has been disposed.

The OnEndLoad method is invoked when loading is finished. It is always called, even if an exception is thrown during loading. The value of successful will be set to true if the load succeeded, or false if a fatal error occurred. The errors collection will contain objects that were reported as errors. Usually, these objects are exceptions.

If you implement IDesignerLoaderService to provide dependent load support, you should call the OnEndLoad method after the last call to the IDesignerLoaderService.DependentLoadComplete method. By default, BasicDesignerLoader implements IDesignerLoaderService and does this for you. If IDesignerLoaderService is not available when BeginLoad is called, BeginLoad will directly call OnEndLoad after calling PerformLoad.

This method should be called by the designer loader service when all dependent loads have been completed. This stops the loading process that was initiated by the BeginLoad method. If you provide your own loader service, or if you choose not to provide a loader service, you are responsible for calling this method. The BeginLoad method will automatically call this, either indirectly by calling the IDesignerLoaderService.DependentLoadComplete method if IDesignerLoaderService is available, or directly if it is not.

.NET Framework
Available since 2.0
Return to top
Show: