示例#1
0
        private void ComputeContent()
        {
            // Get list of META
            // For every META :
            //   -- Get macro
            //   -- Get env
            //   -- Get packages
            // For every macro
            //   -- Get pack
            // For every env
            //   -- Get pack


            foreach (Meta meta in Linq.ListMetas(CurrentTemplate))
            {
                Add(meta);
            }

            foreach (Macro macro in Linq.ListMacros(CurrentTemplate))
            {
                Add(macro);
            }

            foreach (LTG_Entity.Environment env in Linq.ListEnvironments(CurrentTemplate))
            {
                Add(env);
            }

            foreach (Package package in Linq.ListPackages(CurrentTemplate))
            {
                Add(package);
            }
        }
示例#2
0
        public void Add(LTG_Entity.Environment e)
        {
            bool add = true;

            foreach (LTG_Entity.Environment env in AddedEnv)
            {
                if (env.Nom == e.Nom)
                {
                    add = false;
                }
            }

            if (add)
            {
                // Add the environment
                AddedEnv.Add(e);
                // Add the packages dependencies
                foreach (Package p in Linq.ListPackages(e))
                {
                    Add(p);
                }
            }
        }
示例#3
0
        public void Add(Macro m)
        {
            bool add = true;

            foreach (Macro macro in AddedMacros)
            {
                if (macro.Nom == m.Nom)
                {
                    add = false;
                }
            }

            if (add)
            {
                // Add the macro
                AddedMacros.Add(m);
                // Add the packages dependencies
                foreach (Package p in Linq.ListPackages(m))
                {
                    Add(p);
                }
            }
        }
示例#4
0
        public void Add(Meta meta)
        {
            bool add = true;

            foreach (Meta m in AddedMetas)
            {
                if (meta.Nom == m.Nom)
                {
                    add = false;
                }
            }

            if (add)
            {
                // Add the meta
                AddedMetas.Add(meta);
                foreach (Meta meta2 in Linq.ListMetas(meta))
                {
                    Add(meta2);
                }
                // Add its related macros
                foreach (Macro m in Linq.ListMacros(meta))
                {
                    Add(m);
                }
                // Add its related environments
                foreach (LTG_Entity.Environment e in Linq.ListEnvironments(meta))
                {
                    Add(e);
                }
                // Add its related packages
                foreach (Package p in Linq.ListPackages(meta))
                {
                    Add(p);
                }
            }
        }