Ejemplo n.º 1
0
        public void FillTriggers(NamePicker np)
        {
            IList <IList <string> > replace = new List <IList <string> >();

            foreach (IList <string> item in Triggers)
            {
                int i = item.IndexOf(@"[:TRIGGERNAME:]");
                int j = item.IndexOf(@"[:TABLENAME:]");
                int k = item.IndexOf(@"[:EXECUTABLENAME:]");
                IList <IList <string> > c = new List <IList <string> >();
                c.Add(new List <string>());
                c = Cartesian(c, (0 > i) ? new List <string>() : np.Triggers, (0 > i));
                c = Cartesian(c, (0 > j) ? new List <string>() : np.Selectables, false);
                c = Cartesian(c, (0 > k) ? new List <string>() : np.Executables, false);
                int total = c.Count;
                IList <IList <string> > add = new List <IList <string> >();
                for (int l = 0; total > l; ++l)
                {
                    add.Add(new List <string>(item));
                }
                for (int m = 0; total > m; ++m)
                {
                    if (-1 < k)
                    {
                        add[m][k] = c[m][2];
                    }
                    if (-1 < j)
                    {
                        add[m][j] = c[m][1];
                    }
                    if (-1 < i)
                    {
                        add[m][i] = c[m][0];
                    }
                }
                foreach (IList <string> addItem in add)
                {
                    replace.Add(addItem);
                }
            }
            Triggers = replace;
        }
Ejemplo n.º 2
0
        private IList <IList <string> > Fill(NamePicker np, IList <IList <string> > arg)
        {
            IList <IList <string> > replace = new List <IList <string> >();

            foreach (IList <string> item in arg)
            {
                int i = item.IndexOf(@"[:TABLENAME:]");
                int j = item.IndexOf(@"[:EXECUTABLENAME:]");
                IList <IList <string> > c = new List <IList <string> >();
                c.Add(new List <string>());
                c = Cartesian(c, (0 > i) ? new List <string>() : np.Selectables, (0 > i));
                c = Cartesian(c, (0 > j) ? new List <string>() : np.Executables, false);
                int total = c.Count;
                IList <IList <string> > add = new List <IList <string> >();
                for (int k = 0; total > k; ++k)
                {
                    add.Add(new List <string>(item));
                }
                for (int l = 0; total > l; ++l)
                {
                    if (-1 < j)
                    {
                        add[l][j] = c[l][1];
                    }
                    if (-1 < i)
                    {
                        add[l][i] = c[l][0];
                    }
                }
                foreach (IList <string> addItem in add)
                {
                    replace.Add(addItem);
                }
            }
            arg = replace;
            return(arg);
        }
Ejemplo n.º 3
0
 public void FillViews(NamePicker np) => Views = Fill(np, Views);
Ejemplo n.º 4
0
 public void FillProcedures(NamePicker np) => Procedures = Fill(np, Procedures);
Ejemplo n.º 5
0
 public void FillPackages(NamePicker np) => Packages = Fill(np, Packages);
Ejemplo n.º 6
0
 public void FillFunctions(NamePicker np) => Functions = Fill(np, Functions);