public static IVariable FindVariableDefinitionByName(this IScope scope, string name, int position) { var variables = scope.GetApplicableVariables(position); return variables.FirstOrDefault(x => x.Name.EqualsOrdinal(name)); } }