public FindLine ( int line ) : |
||
line | int | |
return |
public SourceLocation FindLine(int line)
{
MethodSource[] methods = module.GetMethods (this);
foreach (MethodSource method in methods) {
if (!method.HasSourceFile)
continue;
if ((method.StartRow <= line) && (method.EndRow >= line))
return new SourceLocation (method, this, line);
}
return new SourceLocation (this, line);
}
// <summary> // Find the method containing line @line in @source_file, which must be // the file's full pathname. // </summary> public SourceLocation FindLocation(string source_file, int line) { SourceFile file = FindFile(source_file); if (file == null) { return(null); } return(file.FindLine(line)); }