public void DeleteSearch(Guid searchId) { var entity = _tableStorageProvider.GetEntity <SearchEntity>(SearchEntity.AllUsersPk, searchId.ToString()); if (entity == null) { throw new Exception("No such search " + searchId); } if (entity.InputContainer != null) { _blobStorageProvider.DeleteContainer(entity.InputContainer); } if (entity.OutputContainer != null) { _blobStorageProvider.DeleteContainer(entity.OutputContainer); } if (entity.JobId != null) { try { _batchClient.JobOperations.DeleteJob(entity.JobId); } catch (BatchException be) { if (be.RequestInformation.HttpStatusCode != HttpStatusCode.NotFound) { throw; } } } var queries = _tableStorageProvider.ListEntities <SearchQueryEntity>(entity.RowKey); if (queries != null) { Parallel.ForEach(queries, q => { _tableStorageProvider.DeleteEntity(q); }); } _tableStorageProvider.DeleteEntity(entity); }
private void LoadConfiguration() { try { var entities = _tableStorageProvider.ListEntities <ConfigurationEntity>(); if (entities != null) { foreach (var configurationEntity in entities) { _configuration[configurationEntity.Key] = configurationEntity.Value; } } } catch (Exception e) { Console.WriteLine("Failed to load config {0}", e); _configuration = _defaultConfiguration; } }
public IEnumerable <AnalysisEntity> ListAnalyses() { return(_tableStorageProvider.ListEntities <AnalysisEntity>(AnalysisEntity.AllUsersPk)); }
private IReadOnlyList <DatabaseEntity> ListSystemDatabases() { return(_tableStorageProvider.ListEntities <DatabaseEntity>().ToList()); }
public IReadOnlyList <DatabaseEntity> ListDatabases() { var databaseEntities = _tableStorageProvider.ListEntities <DatabaseEntity>(); return(databaseEntities.ToList()); }
public IEnumerable <SearchEntity> ListSearches() { return(_tableStorageProvider.ListEntities <SearchEntity>(SearchEntity.AllUsersPk)); }
public IEnumerable <ExternalRepository> ListRepositories() { return(_tableStorageProvider.ListEntities <ExternalRepository>(ExternalRepository.DefaultPk).Select(HydrateEntity)); }