예제 #1
0
        private void GetValuesFromVariable(string sName, IEnumerable e)
        {
            TypeView    view       = new TypeView();
            int         i          = 1;
            IEnumerator enumerator = e.GetEnumerator();

            while (enumerator.MoveNext())
            {
                string sName2 = sName + i++.ToString();
                view.Variable = enumerator.Current;
                foreach (NamedValue value in view.Values)
                {
                    if (value.Name == "")
                    {
                        value.Name = sName2;
                    }
                    else
                    {
                        value.Name = sName2 + "_" + value.Name;
                    }
                    _values.Add(value);
                }
            }
        }
예제 #2
0
 private void GetValuesFromVariable(string name, IEnumerable list)
 {
     TypeView view = new TypeView();
     int i = 1;
     IEnumerator enumerator = list.GetEnumerator();
     while (enumerator.MoveNext())
     {
         string name2 = name + i++.ToString();
         view.Variable = enumerator.Current;
         foreach (NamedValue value in view.Values)
         {
             if (value.Name == "")
                 value.Name = name2; else value.Name = name2 + "_" + value.Name;
             _values.Add(value);
         }
     }
 }