private Instruction GetILInstructionWithLineNumber(Instruction ins, bool bSearchForward)
{
Instruction current = ins;
if (bSearchForward)
{
while (current != null && !this.HasValidFileAndLineNumber(current))
{
current = current.Next;
}
}
else
{
while (current != null && !this.HasValidFileAndLineNumber(current))
{
current = current.Previous;
}
}
return current;
}