示例#1
0
 public static bool TryGetMethod(this DebugInfo debugInfo, int instructionPointer, [MaybeNullWhen(false)] out DebugInfo.Method method)
 {
     method = debugInfo.GetMethod(instructionPointer);
     return(method != null);
 }
示例#2
0
 public static DebugInfo.Method?GetMethod(this DebugInfo debugInfo, int instructionPointer)
 {
     return(debugInfo.Methods
            .SingleOrDefault(m => m.Range.Start <= instructionPointer && instructionPointer <= m.Range.End));
 }