Mono.Debugger.Languages.TargetArrayObject.GetElement C# (CSharp) Method

GetElement() abstract private method

abstract private GetElement ( TargetMemoryAccess target, int indices ) : TargetObject
target TargetMemoryAccess
indices int
return TargetObject
        internal abstract TargetObject GetElement(TargetMemoryAccess target, int[] indices);

Same methods

TargetArrayObject::GetElement ( System.Thread thread, int indices ) : TargetObject

Usage Example

Example #1
0
        protected void FormatArray(Thread target, TargetArrayObject aobj,
					    TargetArrayBounds bounds, int dimension,
					    int[] indices)
        {
            Append ("[ ");
            indent_level += 3;

            bool first = true;

            int[] new_indices = new int [dimension + 1];
            indices.CopyTo (new_indices, 0);

            int lower, upper;
            if (!bounds.IsMultiDimensional) {
                lower = 0;
                upper = bounds.Length - 1;
            } else {
                lower = bounds.LowerBounds [dimension];
                upper = bounds.UpperBounds [dimension];
            }

            for (int i = lower; i <= upper; i++) {
                if (!first) {
                    Append (", ");
                    CheckLineWrap ();
                }
                first = false;

                new_indices [dimension] = i;
                if (dimension + 1 < bounds.Rank)
                    FormatArray (target, aobj, bounds, dimension + 1, new_indices);
                else {
                    TargetObject eobj = aobj.GetElement (target, new_indices);
                    FormatObjectRecursed (target, eobj, false);
                }
            }

            Append (first ? "]" : " ]");
            indent_level -= 3;
        }