Example #1
0
 public Join(QueryBlock block, RangeVariable lt, Expression inner, QueryBlock outerSelector, QueryBlock innerSelector, Location loc)
     : base(block, lt, inner, loc)
 {
     this.outer_selector = outerSelector;
     this.inner_selector = innerSelector;
 }
Example #2
0
 protected ARangeVariableQueryClause(QueryBlock block, RangeVariable identifier, Expression expr, Location loc)
     : base(block, expr, loc)
 {
     this.identifier = identifier;
 }
Example #3
0
 public QueryStartClause(QueryBlock block, Expression expr, RangeVariable identifier, Location loc)
     : base(block, identifier, expr, loc)
 {
     block.AddRangeVariable(identifier);
 }
Example #4
0
		protected ARangeVariableQueryClause (QueryBlock block, RangeVariable identifier, Expression expr, Location loc)
			: base (block, expr, loc)
		{
			this.identifier = identifier;
		}
Example #5
0
 protected AQueryClause(QueryBlock block, Expression expr, Location loc)
     : base(expr)
 {
     this.block = block;
     this.loc   = loc;
 }
Example #6
0
 public SelectMany(QueryBlock block, RangeVariable identifier, Expression expr, Location loc)
     : base(block, identifier, expr, loc)
 {
 }
Example #7
0
 public OrderByDescending(QueryBlock block, Expression expr)
     : base(block, expr, expr.Location)
 {
 }
Example #8
0
		public SelectMany (QueryBlock block, RangeVariable identifier, Expression expr, Location loc)
			: base (block, identifier, expr, loc)
		{
		}
Example #9
0
		protected override void CreateArguments (ResolveContext ec, Parameter parameter, ref Arguments args)
		{
			if (args == null) {
				if (IdentifierType != null)
					expr = CreateCastExpression (expr);

				base.CreateArguments (ec, parameter.Clone (), ref args);
			}

			Expression result_selector_expr;
			QueryBlock result_block;

			var target = GetIntoVariable ();
			var target_param = new ImplicitLambdaParameter (target.Name, target.Location);

			//
			// When select follows use it as a result selector
			//
			if (next is Select) {
				result_selector_expr = next.Expr;

				result_block = next.block;
				result_block.SetParameters (parameter, target_param);

				next = next.next;
			} else {
				result_selector_expr = CreateRangeVariableType (ec, parameter, target, new SimpleName (target.Name, target.Location));

				result_block = new QueryBlock (block.Parent, block.StartLocation);
				result_block.SetParameters (parameter, target_param);
			}

			LambdaExpression result_selector = new LambdaExpression (Location);
			result_selector.Block = result_block;
			result_selector.Block.AddStatement (new ContextualReturn (result_selector_expr));

			args.Add (new Argument (result_selector));
		}
Example #10
0
		public GroupJoin (QueryBlock block, RangeVariable lt, Expression inner,
			QueryBlock outerSelector, QueryBlock innerSelector, RangeVariable into, Location loc)
			: base (block, lt, inner, outerSelector, innerSelector, loc)
		{
			this.into = into;
		}
Example #11
0
		public Select (QueryBlock block, Expression expr, Location loc)
			: base (block, expr, loc)
		{
		}
Example #12
0
		public Join (QueryBlock block, RangeVariable lt, Expression inner, QueryBlock outerSelector, QueryBlock innerSelector, Location loc)
			: base (block, lt, inner, loc)
		{
			this.outer_selector = outerSelector;
			this.inner_selector = innerSelector;
		}
Example #13
0
		public GroupBy (QueryBlock block, Expression elementSelector, QueryBlock elementBlock, Expression keySelector, Location loc)
			: base (block, keySelector, loc)
		{
			//
			// Optimizes clauses like `group A by A'
			//
			if (!elementSelector.Equals (keySelector)) {
				this.element_selector = elementSelector;
				this.element_block = elementBlock;
			}
		}
Example #14
0
		public QueryStartClause (QueryBlock block, Expression expr, RangeVariable identifier, Location loc)
			: base (block, identifier, expr, loc)
		{
			block.AddRangeVariable (identifier);
		}
Example #15
0
 public GroupJoin(QueryBlock block, RangeVariable lt, Expression inner,
                  QueryBlock outerSelector, QueryBlock innerSelector, RangeVariable into, Location loc)
     : base(block, lt, inner, outerSelector, innerSelector, loc)
 {
     this.into = into;
 }
Example #16
0
		public Where (QueryBlock block, Expression expr, Location loc)
			: base (block, expr, loc)
		{
		}
Example #17
0
 public Select(QueryBlock block, Expression expr, Location loc)
     : base(block, expr, loc)
 {
 }
Example #18
0
		public OrderByDescending (QueryBlock block, Expression expr)
			: base (block, expr, expr.Location)
		{
		}
Example #19
0
 public Where(QueryBlock block, Expression expr, Location loc)
     : base(block, expr, loc)
 {
 }
Example #20
0
		public ThenByDescending (QueryBlock block, Expression expr)
			: base (block, expr)
		{
		}
Example #21
0
 public ThenByDescending(QueryBlock block, Expression expr)
     : base(block, expr)
 {
 }
Example #22
0
		protected AQueryClause (QueryBlock block, Expression expr, Location loc)
			 : base (expr)
		{
			this.block = block;
			this.loc = loc;
		}