static IEnumerable <RemoteValue> GetRemoteValueChildren(RemoteValue remoteValue, int offset, int count) { var result = new List <RemoteValue>(); uint childOffset = (uint)offset; uint endIndex = (uint)(offset + count); uint numChildren = remoteValue.GetNumChildren(); while (childOffset < endIndex) { // Fetch children in batches for performance reasons. uint batchSize = System.Math.Min(endIndex - childOffset, _maxChildBatchSize); List <RemoteValue> currentBatch = remoteValue.GetChildren(childOffset, batchSize); for (int n = 0; n < batchSize; ++n) { RemoteValue childValue = currentBatch[n]; if (childValue != null) { result.Add(childValue); } else if (n + childOffset < numChildren) { // There were times when LLDB was returning an error and thus a null child // value. ex: Children[1] for a CustomType&* type. Trace.WriteLine( $"WARNING: No child found at index {n + childOffset} of " + $"({remoteValue.GetTypeName()}){remoteValue.GetFullName()} even " + $"though there are {numChildren} children."); } } childOffset += batchSize; } return(result); }
public virtual List <RemoteValue> GetChildren(uint offset, uint count) => remoteProxy.GetChildren(offset, count);
public virtual List <RemoteValue> GetChildren(uint offset, uint count) { return(value.GetChildren(offset, count)); }