Microsoft.R.Core.AST.ScopeExtensions.FindFunctionDefinitionByName C# (CSharp) Method

FindFunctionDefinitionByName() public static method

Locates function with a given name inside the scope. Only function definition that appear before the given position are analyzed except when scope is the global scope.
public static FindFunctionDefinitionByName ( this scope, string name, int position ) : IVariable
scope this
name string
position int
return IVariable
        public static IVariable FindFunctionDefinitionByName(this IScope scope, string name, int position) {
            var variables = scope.GetApplicableVariables(position);
            var v = variables.FirstOrDefault(x =>
                (x.Value is RFunction) && x.Name.EqualsOrdinal(name));
            return v;
        }