Exemplo n.º 1
0
        private static void ArrayEnumeration(Converter.ValueActionDelegate action, Converter.ArrayAccessor accessor, int rank, object[] attributes)
        {
            Array array      = accessor.array;
            int   lowerBound = array.GetLowerBound(rank);
            int   upperBound = array.GetUpperBound(rank);

            if (rank + 1 < array.Rank)
            {
                for (int index = lowerBound; index <= upperBound; ++index)
                {
                    accessor.index[rank] = index;
                    Converter.ArrayEnumeration(action, accessor, rank + 1, attributes);
                }
            }
            else
            {
                for (int index = lowerBound; index <= upperBound; ++index)
                {
                    //Debug.Log($"ArrayEnumeration 枚举数组数据({index} / {array.Length})");

                    accessor.index[rank] = index;
                    Converter.ValueAction(action, accessor, attributes);
                }
            }
        }
Exemplo n.º 2
0
 private static void ArrayEnumeration(Converter.ValueActionDelegate action, Converter.Accessor accessor, object[] attributes)
 {
     Converter.ArrayAccessor accessor1 = new Converter.ArrayAccessor(accessor.obj as Array);
     Converter.ArrayEnumeration(action, accessor1, 0, attributes);
 }