/// <summary> /// Gathers dependencies of ColumnInfo, this includes all [Sql] properties on any object in data export / catalogue databases /// which references the fully qualified name of the ColumnInfo as well as it's immediate network friends that should share it's /// runtime name e.g. CatalogueItem and ExtractionInformation. /// </summary> /// <param name="c"></param> /// <returns></returns> public GatheredObject GatherDependencies(ColumnInfo c) { var allObjects = GetAllObjectsInAllDatabases(); var propertyFinder = new AttributePropertyFinder <SqlAttribute>(allObjects); var root = new GatheredObject(c); foreach (var o in allObjects) { //don't add a reference to the thing we are gathering dependencies on! if (Equals(o, c)) { continue; } foreach (var propertyInfo in propertyFinder.GetProperties(o)) { var sql = (string)propertyInfo.GetValue(o); if (sql != null && sql.Contains(c.Name)) { root.Children.Add(new GatheredObject(o)); } } } return(root); }
public GatheredObject GatherDependencies(LoadMetadata loadMetadata) { //Share the LoadMetadata var root = new GatheredObject(loadMetadata); //and the catalogues behind the load foreach (var cata in loadMetadata.GetAllCatalogues()) { root.Children.Add(GatherDependencies(cata)); } //and the load operations foreach (IProcessTask processTask in loadMetadata.ProcessTasks) { var gpt = new GatheredObject(processTask); root.Children.Add(gpt); foreach (IArgument a in processTask.GetAllArguments()) { var ga = new GatheredObject(a); gpt.Children.Add(ga); } } return(root); }
public GatheredObject GatherDependencies(ANOTable anoTable) { var root = new GatheredObject(anoTable.Server); root.Children.Add(new GatheredObject(anoTable)); return(root); }
public GatheredObject GatherDependencies(Curation.Data.Plugin plugin) { var root = new GatheredObject(plugin); foreach (var lma in plugin.LoadModuleAssemblies) { root.Children.Add(new GatheredObject(lma)); } return(root); }
public GatheredObject GatherDependencies(IFilter filter) { var root = new GatheredObject(filter); foreach (var param in filter.GetAllParameters()) { root.Children.Add(new GatheredObject((IMapsDirectlyToDatabaseTable)param)); } return(root); }
public GatheredObject GatherDependencies(Catalogue catalogue) { var root = new GatheredObject(catalogue); foreach (var cis in catalogue.CatalogueItems) { root.Children.Add(new GatheredObject(cis)); } return(root); }
protected bool Equals(GatheredObject other) { return(Equals(Object, other.Object)); }