コード例 #1
0
        public override IEnumerable <ulong> EnumerateObjectAddresses()
        {
            if (Revision != GetRuntimeRevision())
            {
                ClrDiagnosticsException.ThrowRevisionError(Revision, GetRuntimeRevision());
            }

            for (int i = 0; i < _segments.Length; ++i)
            {
                ClrSegment seg = _segments[i];
                for (ulong obj = seg.FirstObject; obj != 0; obj = seg.NextObject(obj))
                {
                    _lastSegmentIdx = i;
                    yield return(obj);
                }
            }
        }
コード例 #2
0
        public override IEnumerable <ClrObject> EnumerateObjects()
        {
            if (Revision != GetRuntimeRevision())
            {
                ClrDiagnosticsException.ThrowRevisionError(Revision, GetRuntimeRevision());
            }

            for (int i = 0; i < _segments.Length; ++i)
            {
                var seg = _segments[i];
                for (ClrObject obj = seg.FirstObject; !obj.IsNull; obj = seg.GetNextObject(obj))
                {
                    _lastSegmentIdx = i;
                    yield return(obj);
                }
            }
        }
コード例 #3
0
        public override IEnumerable <ClrObject> EnumerateObjects()
        {
            if (Revision != GetRuntimeRevision())
            {
                ClrDiagnosticsException.ThrowRevisionError(Revision, GetRuntimeRevision());
            }

            for (int i = 0; i < _segments.Length; ++i)
            {
                ClrSegment seg = _segments[i];

                for (ulong obj = seg.GetFirstObject(out ClrType type); obj != 0; obj = seg.NextObject(obj, out type))
                {
                    _lastSegmentIdx = i;
                    yield return(ClrObject.Create(obj, type));
                }
            }
        }