Smrf.NodeXL.ExcelTemplate.GraphMetricCalculationManager.BackgroundWorker_RunWorkerCompleted C# (CSharp) Method

BackgroundWorker_RunWorkerCompleted() protected method

protected BackgroundWorker_RunWorkerCompleted ( object sender, RunWorkerCompletedEventArgs e ) : void
sender object
e System.ComponentModel.RunWorkerCompletedEventArgs
return void
    BackgroundWorker_RunWorkerCompleted
    (
        object sender,
        RunWorkerCompletedEventArgs e
    )
    {
        AssertValid();

        // Forward the event.

        RunWorkerCompletedEventHandler oGraphMetricCalculationCompleted =
            this.GraphMetricCalculationCompleted;

        if (oGraphMetricCalculationCompleted != null)
        {
            // If the operation was successful, the
            // RunWorkerCompletedEventArgs.Result must be a GraphMetricColumn
            // array.  (Actually, it's always a GraphMetricColumn array
            // regardless of the operation's outcome, but you can't read the
            // Result property unless the operation was successful.)

            Debug.Assert( e.Cancelled || e.Error != null ||
                e.Result is GraphMetricColumn[] );

            oGraphMetricCalculationCompleted(this, e);
        }

        m_oBackgroundWorker = null;
    }