Exemple #1
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;
		}
Exemple #2
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;
			}
		}
Exemple #3
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;
		}
Exemple #4
0
 protected ARangeVariableQueryClause(QueryBlock block, RangeVariable identifier, Expression expr, Location loc)
     : base(block, expr, loc)
 {
     this.identifier = identifier;
 }
Exemple #5
0
		public QueryStartClause (QueryBlock block, Expression expr, RangeVariable identifier, Location loc)
			: base (block, identifier, expr, loc)
		{
			block.AddRangeVariable (identifier);
		}
Exemple #6
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));
		}
Exemple #7
0
		public OrderByDescending (QueryBlock block, Expression expr)
			: base (block, expr, expr.Location)
		{
		}
Exemple #8
0
 public Where(QueryBlock block, Expression expr, Location loc)
     : base(block, expr, loc)
 {
 }
Exemple #9
0
 public OrderByDescending(QueryBlock block, Expression expr)
     : base(block, expr, expr.Location)
 {
 }
Exemple #10
0
 public Select(QueryBlock block, Expression expr, Location loc)
     : base(block, expr, loc)
 {
 }
Exemple #11
0
 public SelectMany(QueryBlock block, RangeVariable identifier, Expression expr, Location loc)
     : base(block, identifier, expr, loc)
 {
 }
Exemple #12
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;
 }
Exemple #13
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;
 }
Exemple #14
0
 public QueryStartClause(QueryBlock block, Expression expr, RangeVariable identifier, Location loc)
     : base(block, identifier, expr, loc)
 {
     block.AddRangeVariable(identifier);
 }
Exemple #15
0
		public Select (QueryBlock block, Expression expr, Location loc)
			: base (block, expr, loc)
		{
		}
Exemple #16
0
 public ThenByDescending(QueryBlock block, Expression expr)
     : base(block, expr)
 {
 }
Exemple #17
0
		public SelectMany (QueryBlock block, RangeVariable identifier, Expression expr, Location loc)
			: base (block, identifier, expr, loc)
		{
		}
Exemple #18
0
		protected AQueryClause (QueryBlock block, Expression expr, Location loc)
			 : base (expr)
		{
			this.block = block;
			this.loc = loc;
		}
Exemple #19
0
		public Where (QueryBlock block, Expression expr, Location loc)
			: base (block, expr, loc)
		{
		}
Exemple #20
0
		protected ARangeVariableQueryClause (QueryBlock block, RangeVariable identifier, Expression expr, Location loc)
			: base (block, expr, loc)
		{
			this.identifier = identifier;
		}
Exemple #21
0
		public ThenByDescending (QueryBlock block, Expression expr)
			: base (block, expr)
		{
		}
Exemple #22
0
 protected AQueryClause(QueryBlock block, Expression expr, Location loc)
     : base(expr)
 {
     this.block = block;
     this.loc   = loc;
 }