Пример #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));
 }