private async void DeleteVersion() { IsLoading = true; Children.Clear(); UpdateMenu(); Caption = Resources.CloudExplorerGaeVersionDeleteMessage; GaeDataSource dataSource = _owner.DataSource; try { await dataSource.DeleteVersionAsync(_service.Id, _version.Id); _owner.InvalidateService(_service.Id); EventsReporterWrapper.ReportEvent(GaeVersionDeletedEvent.Create(CommandStatus.Success)); } catch (Exception ex) when(ex is DataSourceException || ex is TimeoutException || ex is OperationCanceledException) { EventsReporterWrapper.ReportEvent(GaeVersionDeletedEvent.Create(CommandStatus.Failure)); IsLoading = false; IsError = true; if (ex is DataSourceException) { Caption = Resources.CloudExplorerGaeDeleteVersionErrorMessage; } else if (ex is TimeoutException) { Caption = Resources.CloudExploreOperationTimeoutMessage; } else if (ex is OperationCanceledException) { Caption = Resources.CloudExploreOperationCanceledMessage; } } }