Ejemplo n.º 1
0
 internal Scope(ExecutionBuilder.Scope outer, ParameterExpression fieldReader, TableAlias alias, IEnumerable <ColumnDeclaration> columns)
 {
     this.outer       = outer;
     this.fieldReader = fieldReader;
     this.Alias       = alias;
     //this.nameMap = columns.Select(((Func<ColumnDeclaration, int, <>f__AnonymousType0<ColumnDeclaration, int>>) ((c, i) => new { c = c, i = i }))).ToDictionary(x => x.c.Name, x => x.i);
 }
Ejemplo n.º 2
0
 internal bool TryGetValue(ColumnExpression column, out ParameterExpression fieldReader, out int ordinal)
 {
     for (ExecutionBuilder.Scope scope = this; scope != null; scope = scope.outer)
     {
         if ((column.Alias == scope.Alias) && this.nameMap.TryGetValue(column.Name, out ordinal))
         {
             fieldReader = this.fieldReader;
             return(true);
         }
     }
     fieldReader = null;
     ordinal     = 0;
     return(false);
 }