private void MakeCacheDecision() { if (CacheServer == null) { SetCacheUsage(CacheUsage.AllOrNothing, "there is no cache server"); } else { _log.AppendLine($"Cache Server:{CacheServer.Server} (DatabaseType:{CacheServer.DatabaseType})"); SetCacheUsage(CacheUsage.Opportunistic, "there is a cache server (so starting with Opportunistic)"); } DependenciesSingleServer = new DataAccessPointCollection(true); foreach (var dependency in Dependencies) { _log.AppendLine($"Evaluating '{dependency.CohortSet}'"); foreach (ITableInfo dependantTable in dependency.CohortSet.Catalogue.GetTableInfoList(false)) { HandleDependency(dependency, false, dependantTable); } if (dependency.JoinedTo != null) { _log.AppendLine($"Evaluating '{dependency.JoinedTo}'"); foreach (ITableInfo dependantTable in dependency.JoinedTo.Catalogue.GetTableInfoList(false)) { HandleDependency(dependency, true, dependantTable); } } } }
/// <summary> /// Returns a new collection with a new set of <see cref="Points"/> matching the old set (but not instance). /// </summary> /// <returns></returns> public DataAccessPointCollection Clone() { var col = new DataAccessPointCollection(SingleServer, DataAccessContext); col._points = new HashSet <IDataAccessPoint>(_points); return(col); }