private SourceInformation GetSourceInformation(MethodDebugInformationHandle handle) { SourceInformation sourceInformation = null; try { var methodDebugDefinition = _reader.GetMethodDebugInformation(handle); var fileName = GetMethodFileName(methodDebugDefinition); var lineNumber = GetMethodStartLineNumber(methodDebugDefinition); sourceInformation = new SourceInformation(fileName, lineNumber); } catch (BadImageFormatException) { } return sourceInformation; }
private SourceInformation GetSourceInformation(MethodDebugInformationHandle handle) { if (_reader == null) { throw new ObjectDisposedException(nameof(PortablePdbReader)); } SourceInformation sourceInformation = null; try { var methodDebugDefinition = _reader.GetMethodDebugInformation(handle); var fileName = GetMethodFileName(methodDebugDefinition); var lineNumber = GetMethodStartLineNumber(methodDebugDefinition); sourceInformation = new SourceInformation(fileName, lineNumber); } catch (BadImageFormatException) { } return(sourceInformation); }