Ejemplo n.º 1
0
        /// <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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        public GatheredObject GatherDependencies(ANOTable anoTable)
        {
            var root = new GatheredObject(anoTable.Server);

            root.Children.Add(new GatheredObject(anoTable));

            return(root);
        }
Ejemplo n.º 4
0
        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);
        }
Ejemplo n.º 5
0
        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);
        }
Ejemplo n.º 6
0
        public GatheredObject GatherDependencies(Catalogue catalogue)
        {
            var root = new GatheredObject(catalogue);

            foreach (var cis in catalogue.CatalogueItems)
            {
                root.Children.Add(new GatheredObject(cis));
            }

            return(root);
        }
Ejemplo n.º 7
0
 protected bool Equals(GatheredObject other)
 {
     return(Equals(Object, other.Object));
 }