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;
|
||||
|
||||
System.ComponentModel.CancelEventArgs ce = new System.ComponentModel.CancelEventArgs();
|
||||
OnStopping(ce);
|
||||
if (ce.Cancel)
|
||||
return;
|
||||
|
||||
ce = new System.ComponentModel.CancelEventArgs();
|
||||
OnBeforeShutdown(ce);
|
||||
if (ce.Cancel)
|
||||
{
|
||||
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);
|
||||
|
||||
OnShutdown(EventArgs.Empty);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user