BackgroundWorker_RunWorkerCompleted
(
object sender,
RunWorkerCompletedEventArgs e
)
{
AssertValid();
// Forward the event.
RunWorkerCompletedEventHandler oImageCreationCompleted =
this.ImageCreationCompleted;
if (oImageCreationCompleted != null)
{
// If the operation was successful, the
// RunWorkerCompletedEventArgs.Result must be a TemporaryImages
// object. (Actually, it's always a TemporaryImages object
// 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 TemporaryImages);
oImageCreationCompleted(this, e);
}
m_oBackgroundWorker = null;
}