コード例 #1
0
 public IEnumerable <ClrObject> GetAllReferencesTo(ulong address)
 {
     foreach (var referenceAddress in HeapIndex.GetReferencesTo(address))
     {
         yield return(Heap.GetObject(referenceAddress));
     }
 }
コード例 #2
0
 private bool FilterByWalkMode(TraversingHeapModes traversingMode, ulong address)
 {
     return(traversingMode switch
     {
         TraversingHeapModes.Live => HeapIndex.HasRoot(address),
         TraversingHeapModes.Dead => !HeapIndex.HasRoot(address),
         TraversingHeapModes.All => true,
         _ => throw new ArgumentOutOfRangeException(nameof(traversingMode), traversingMode, null),
     });