Modifier

Partager via


WorkflowDesignerLoader.OnEndLoad(Boolean, ICollection) Method

Definition

Called when loading of the designer is completed.

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

Parameters

successful
Boolean

true if load operation is successful; otherwise, false.

errors
ICollection

Contains the load errors.

Examples

The following example demonstrates how to override the OnEndLoad method to display errors that might have occurred during the loading of a workflow.

protected override void OnEndLoad(bool successful, ICollection errors)
{
    base.OnEndLoad(successful, errors);

    if (!successful && errors != null)
    {
        System.Text.StringBuilder sb = new System.Text.StringBuilder("Errors\r\n");
        foreach (string error in errors)
        {
            sb.Append(error + "\r\n");
        }

        MessageBox.Show(sb.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
    }
}
Protected Overrides Sub OnEndLoad(ByVal successful As Boolean, ByVal errors As ICollection)
    MyBase.OnEndLoad(successful, errors)

    If Not successful And errors IsNot Nothing Then
        Dim sb As New System.Text.StringBuilder("Errors\r\n")
        For Each errorMessage As String In errors
            sb.Append(errorMessage + "\r\n")
        Next

        MessageBox.Show(sb.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
    End If
End Sub

Applies to