Example #1
0
        // Token: 0x060002DA RID: 730 RVA: 0x0000FEE0 File Offset: 0x0000E0E0
        internal static BasicList GetContiguousGroups(int[] keys, object[] values)
        {
            if (keys == null)
            {
                throw new ArgumentNullException("keys");
            }
            if (values == null)
            {
                throw new ArgumentNullException("values");
            }
            if (values.Length < keys.Length)
            {
                throw new ArgumentException("Not all keys are covered by values", "values");
            }
            BasicList basicList = new BasicList();

            BasicList.Group group = null;
            for (int i = 0; i < keys.Length; i++)
            {
                if (i == 0 || keys[i] != keys[i - 1])
                {
                    group = null;
                }
                if (group == null)
                {
                    group = new BasicList.Group(keys[i]);
                    basicList.Add(group);
                }
                group.Items.Add(values[i]);
            }
            return(basicList);
        }
Example #2
0
 internal static BasicList GetContiguousGroups(int[] keys, object[] values)
 {
     if (keys == null)
     {
         throw new ArgumentNullException("keys");
     }
     if (values == null)
     {
         throw new ArgumentNullException("values");
     }
     if (values.Length < keys.Length)
     {
         throw new ArgumentException("Not all keys are covered by values", "values");
     }
     BasicList basicList = new BasicList();
     BasicList.Group group = null;
     for (int i = 0; i < keys.Length; i++)
     {
         if (i == 0 || keys[i] != keys[i - 1])
         {
             group = null;
         }
         if (group == null)
         {
             group = new BasicList.Group(keys[i]);
             basicList.Add(group);
         }
         group.Items.Add(values[i]);
     }
     return basicList;
 }