Example #1
0
        public BoundMappedArgument(BoundArgument argument, BoundVariable mapped)
        {
            if (argument == null)
                throw new ArgumentNullException("argument");
            if (mapped == null)
                throw new ArgumentNullException("mapped");

            Argument = argument;
            Mapped = mapped;
        }
Example #2
0
            public BoundVariable GetMappedArgument(BoundArgument argument)
            {
                if (_arguments != null)
                {
                    BoundVariable result;
                    _arguments.TryGetValue(argument, out result);
                    return result;
                }

                return null;
            }
Example #3
0
                private BoundVariable GetMappedArgument(BoundArgument argument)
                {
                    var scope = this;

                    while (scope != null)
                    {
                        BoundVariable result;
                        if (
                            scope._arguments != null &&
                            scope._arguments.TryGetValue(argument, out result)
                        )
                            return result;

                        scope = scope.Parent;
                    }

                    return null;
                }
Example #4
0
 private BoundVariable GetMappedArgument(BoundArgument argument)
 {
     var scope = argument.Closure == null ? _scope : _scope.FindScope(argument.Closure);
     return scope.GetMappedArgument(argument);
 }