public void Dispose()
 {
     if (_activeLifetime == this)
     {
         _activeLifetime = null;
     }
 }
 public ClassicDesktopStyleApplicationLifetime()
 {
     if (_activeLifetime != null)
     {
         throw new InvalidOperationException(
                   "Can not have multiple active ClassicDesktopStyleApplicationLifetime instances and the previously created one was not disposed");
     }
     _activeLifetime = this;
 }