/// <summary> /// </summary> protected sealed override void OnStop() { if (AppDebugLevel >= DebugLevel.Common) { Debug.WriteLine($"{nameof(OnXApplication)}.{nameof(OnStop)}"); } DeprecatedApplicationHolder.Remove(this); }
/// <summary> /// </summary> protected sealed override void OnStart() { try { OnApplicationStartBase(); } catch (Exception ex) { if (AppDebugLevel >= DebugLevel.Common) { Debug.WriteLine($"{nameof(OnXApplication)}.{nameof(OnApplicationStartBase)}: ошибка во время запуска."); } if (AppDebugLevel >= DebugLevel.Detailed) { Debug.WriteLine($"{nameof(OnXApplication)}.{nameof(OnApplicationStartBase)}: {ex}"); } } try { OnApplicationStart(); } catch (Exception ex) { if (AppDebugLevel >= DebugLevel.Common) { Debug.WriteLine($"{nameof(OnXApplication)}.{nameof(OnApplicationStart)}: ошибка во время запуска."); } if (AppDebugLevel >= DebugLevel.Detailed) { Debug.WriteLine($"{nameof(OnXApplication)}.{nameof(OnApplicationStart)}: {ex}"); } } DeprecatedApplicationHolder.Set(this); }