rearrange order of OnBeforeShutdown and OnStopping - why are there two of these?
This commit is contained in:
parent
13da008241
commit
2c11c39ff0
@ -493,17 +493,19 @@ namespace MBS.Framework
|
|||||||
Stopping = true;
|
Stopping = true;
|
||||||
|
|
||||||
System.ComponentModel.CancelEventArgs ce = new System.ComponentModel.CancelEventArgs();
|
System.ComponentModel.CancelEventArgs ce = new System.ComponentModel.CancelEventArgs();
|
||||||
OnStopping(ce);
|
|
||||||
if (ce.Cancel)
|
|
||||||
return;
|
|
||||||
|
|
||||||
ce = new System.ComponentModel.CancelEventArgs();
|
|
||||||
OnBeforeShutdown(ce);
|
OnBeforeShutdown(ce);
|
||||||
if (ce.Cancel)
|
if (ce.Cancel)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ce = new System.ComponentModel.CancelEventArgs();
|
||||||
|
|
||||||
|
// OnStopping called after setting Stopping to True, otherwise there is no real difference
|
||||||
|
OnStopping(ce);
|
||||||
|
if (ce.Cancel)
|
||||||
|
return;
|
||||||
|
|
||||||
StopInternal(exitCode);
|
StopInternal(exitCode);
|
||||||
|
|
||||||
OnShutdown(EventArgs.Empty);
|
OnShutdown(EventArgs.Empty);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user