• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Ast.QueryExpression类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中ICSharpCode.NRefactory.Ast.QueryExpression的典型用法代码示例。如果您正苦于以下问题:C# QueryExpression类的具体用法?C# QueryExpression怎么用?C# QueryExpression使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



QueryExpression类属于ICSharpCode.NRefactory.Ast命名空间,在下文中一共展示了QueryExpression类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: QueryExpressionOrderByClause

	void QueryExpressionOrderByClause(
#line  2424 "cs.ATG" 
QueryExpression q) {

#line  2425 "cs.ATG" 
		QueryExpressionOrdering ordering; 
		Expect(140);
		QueryExpressionOrderingClause(
#line  2428 "cs.ATG" 
out ordering);

#line  2428 "cs.ATG" 
		SafeAdd(q, q.Orderings, ordering); 
		while (la.kind == 14) {
			lexer.NextToken();
			QueryExpressionOrderingClause(
#line  2430 "cs.ATG" 
out ordering);

#line  2430 "cs.ATG" 
			SafeAdd(q, q.Orderings, ordering); 
		}
	}
开发者ID:almazik,项目名称:ILSpy,代码行数:23,代码来源:Parser.cs


示例2: VisitQueryExpression

		public virtual object VisitQueryExpression(QueryExpression queryExpression, object data) {
			throw new global::System.NotImplementedException("QueryExpression");
		}
开发者ID:Altaxo,项目名称:Altaxo,代码行数:3,代码来源:NotImplementedAstVisitor.cs


示例3: VisitQueryExpression

		public sealed override object VisitQueryExpression(QueryExpression queryExpression, object data) {
			this.BeginVisit(queryExpression);
			object result = this.TrackedVisitQueryExpression(queryExpression, data);
			this.EndVisit(queryExpression);
			return result;
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:6,代码来源:NodeTrackingAstVisitor.cs


示例4: QueryExpressionIntoClause

	void QueryExpressionIntoClause(
#line  2594 "cs.ATG" 
ref QueryExpression q) {

#line  2595 "cs.ATG" 
		QueryExpression firstQuery = q;
		QueryExpression continuedQuery = new QueryExpression(); 
		continuedQuery.StartLocation = q.StartLocation;
		firstQuery.EndLocation = la.Location;
		continuedQuery.FromClause = new QueryExpressionFromClause();
		CollectionRangeVariable fromVariable = new CollectionRangeVariable();
		continuedQuery.FromClause.Sources.Add(fromVariable);
		fromVariable.StartLocation = la.Location;
		// nest firstQuery inside continuedQuery.
		fromVariable.Expression = firstQuery;
		continuedQuery.IsQueryContinuation = true;
		q = continuedQuery;
		
		Expect(136);
		Identifier();

#line  2610 "cs.ATG" 
		fromVariable.Identifier = t.val; 

#line  2611 "cs.ATG" 
		continuedQuery.FromClause.EndLocation = t.EndLocation; 
		QueryExpressionBody(
#line  2612 "cs.ATG" 
ref q);
	}
开发者ID:pluraldj,项目名称:SharpDevelop,代码行数:30,代码来源:Parser.cs


示例5: GetQueryVariableEndScope

		Location GetQueryVariableEndScope(QueryExpression queryExpression)
		{
			return queryExpression.EndLocation;
		}
开发者ID:raufbutt,项目名称:monodevelop-old,代码行数:4,代码来源:LookupTableVisitor.cs


示例6: QueryExpression

	void QueryExpression(
//#line  2420 "cs.ATG" 
out Expression outExpr) {

//#line  2421 "cs.ATG" 
		QueryExpression q = new QueryExpression(); outExpr = q; q.StartLocation = la.Location; 
		QueryExpressionFromClause fromClause;
		
		QueryExpressionFromClause(
//#line  2425 "cs.ATG" 
out fromClause);

//#line  2425 "cs.ATG" 
		q.FromClause = fromClause; 
		QueryExpressionBody(
//#line  2426 "cs.ATG" 
ref q);

//#line  2427 "cs.ATG" 
		q.EndLocation = t.EndLocation; 
		outExpr = q; /* set outExpr to q again if QueryExpressionBody changed it (can happen with 'into' clauses) */ 
		
	}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:23,代码来源:Parser.cs


示例7: QueryExpression

	void QueryExpression(
#line  2462 "cs.ATG" 
out Expression outExpr) {

#line  2463 "cs.ATG" 
		QueryExpression q = new QueryExpression(); outExpr = q; q.StartLocation = la.Location; 
		QueryExpressionFromClause fromClause;
		
		QueryExpressionFromClause(
#line  2467 "cs.ATG" 
out fromClause);

#line  2467 "cs.ATG" 
		q.FromClause = fromClause; 
		QueryExpressionBody(
#line  2468 "cs.ATG" 
ref q);

#line  2469 "cs.ATG" 
		q.EndLocation = t.EndLocation; 
		outExpr = q; /* set outExpr to q again if QueryExpressionBody changed it (can happen with 'into' clauses) */ 
		
	}
开发者ID:pluraldj,项目名称:SharpDevelop,代码行数:23,代码来源:Parser.cs


示例8: QueryExpressionIntoClause

 public QueryExpressionIntoClause()
 {
     intoIdentifier = "?";
     continuedQuery = QueryExpression.Null;
 }
开发者ID:almazik,项目名称:ILSpy,代码行数:5,代码来源:Generated.cs


示例9: VisitQueryExpression

 public virtual bool VisitQueryExpression(QueryExpression queryExpression, object d)
 {
     if ((queryExpression == null)) {
         return SetFailure();
     }
     if ((d == null)) {
         return SetFailure();
     }
     if ((queryExpression.FromClause == null)) {
         return SetFailure();
     }
     if ((queryExpression.MiddleClauses == null)) {
         return SetFailure();
     }
     if ((queryExpression.SelectOrGroupClause == null)) {
         return SetFailure();
     }
     if(queryExpression.GetType() != d.GetType()) {return SetFailure();}
     var data = (QueryExpression)d;
     if (!IsMatch(queryExpression, data)) {
         return SetFailure();
     }
     queryExpression.FromClause.AcceptVisitor(this, data.FromClause);
     if (queryExpression.MiddleClauses.Count == data.MiddleClauses.Count) {
     for (int i=0; i<queryExpression.MiddleClauses.Count;i++) {
         QueryExpressionClause o = queryExpression.MiddleClauses[i];
         if(o == null){return SetFailure();}
         if((bool)o.AcceptVisitor(this, data.MiddleClauses[i]) == false) return SetFailure();
     }			}			else { return SetFailure(); }
     return queryExpression.SelectOrGroupClause.AcceptVisitor(this, data.SelectOrGroupClause);
 }
开发者ID:jbuedel,项目名称:AgentRalphPlugin,代码行数:31,代码来源:AstComparisonVisitor.Generated.cs


示例10: IsMatch

 private bool IsMatch(QueryExpression l, QueryExpression r)
 {
     return l.MiddleClauses.Count == r.MiddleClauses.Count;
 }
开发者ID:Adam-Fogle,项目名称:agentralphplugin,代码行数:4,代码来源:AstComparisonVisitor.cs


示例11: VisitQueryExpression

		public override object VisitQueryExpression(QueryExpression queryExpression, object data)
		{
			return base.VisitQueryExpression(queryExpression, data);
		}
开发者ID:hpsa,项目名称:SharpDevelop,代码行数:4,代码来源:NRefactoryAstVisitor.cs


示例12: VisitQueryExpression

 public virtual object VisitQueryExpression(QueryExpression queryExpression, object data)
 {
     Debug.Assert((queryExpression != null));
     Debug.Assert((queryExpression.FromClause != null));
     Debug.Assert((queryExpression.FromLetWhereClauses != null));
     Debug.Assert((queryExpression.Orderings != null));
     Debug.Assert((queryExpression.SelectOrGroupClause != null));
     Debug.Assert((queryExpression.IntoClause != null));
     queryExpression.FromClause.AcceptVisitor(this, data);
     foreach (QueryExpressionClause o in queryExpression.FromLetWhereClauses) {
         Debug.Assert(o != null);
         o.AcceptVisitor(this, data);
     }
     foreach (QueryExpressionOrdering o in queryExpression.Orderings) {
         Debug.Assert(o != null);
         o.AcceptVisitor(this, data);
     }
     queryExpression.SelectOrGroupClause.AcceptVisitor(this, data);
     return queryExpression.IntoClause.AcceptVisitor(this, data);
 }
开发者ID:almazik,项目名称:ILSpy,代码行数:20,代码来源:AbstractASTVisitor.cs


示例13: VisitQueryExpression

 public override object VisitQueryExpression (QueryExpression queryExpression, object data)
 {
     
     //Write ("E.From(");
     //Write (queryExpression.FromClause.Identifier);
     //Write (" in ");
     var t = (Mono.Cecil.GenericInstanceType)queryExpression.FromClause.InExpression.AcceptVisitor (this, null);
     Locals.Add (queryExpression.FromClause.Identifier, t.GenericArguments[0]);
     
     //Write (")");
     Indent ();
     foreach (var clause in queryExpression.MiddleClauses) {
         NewLine ();
         Write (".CreateQuery(");
         clause.AcceptVisitor (LinqExpressionEmitter, null);
         Write (")");
     }
     NewLine ();
     Write (".CreateQuery(");
     
     var type = queryExpression.SelectOrGroupClause.AcceptVisitor (LinqExpressionEmitter, null);
     Write (")");
     Outdent ();
     var ien = KnownTypes["System.Collections.Generic.IEnumerable"];
     
     //Console.WriteLine("IEN: {0}", ien.GenericParameters[0]);
     //Console.WriteLine ("R: {0}", type);
     return ien;
 }
开发者ID:hallvar,项目名称:Joddes.CS,代码行数:29,代码来源:JsEmitter.cs


示例14: VisitQueryExpression

 public override object VisitQueryExpression(QueryExpression queryExpression, object data)
 {
     if (queryExpression.EndLocation.Line - queryExpression.StartLocation.Line >= 10)
         UnlockWith(queryExpression);
     return base.VisitQueryExpression(queryExpression, data);
 }
开发者ID:timdams,项目名称:strokes,代码行数:6,代码来源:SomeFunnyAchievement.cs


示例15: VisitQueryExpression

		public object VisitQueryExpression(QueryExpression queryExpression, object data)
		{
			AddError(queryExpression, "QueryExpression is not supported.");
			return null;
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:5,代码来源:ConvertVisitorLINQ.cs


示例16: VisitQueryExpression

 public object VisitQueryExpression(QueryExpression queryExpression, object data)
 {
     throw new NotImplementedException ();
 }
开发者ID:Monobjc,项目名称:monobjc-tools,代码行数:4,代码来源:CodeDomExpressionPrinter.cs


示例17: VisitQueryExpression

		public override object VisitQueryExpression(QueryExpression queryExpression, object data)
		{
			if (this.queryExpression != null) // prevent endloss loop: var n = from n select n; n.$ (doesn't make sense, but you can type this)
				return null;
			this.queryExpression = queryExpression;
			IReturnType type = null;
			QueryExpressionSelectClause selectClause = queryExpression.SelectOrGroupClause as QueryExpressionSelectClause;
			if (selectClause != null) {
				InvocationExpression selectInvocation = new InvocationExpression (new MemberReferenceExpression (queryExpression.FromClause.InExpression, "Select"));
				LambdaExpression selectLambdaExpr = new LambdaExpression ();
				selectLambdaExpr.Parent = selectInvocation;
				selectLambdaExpr.Parameters.Add (new ParameterDeclarationExpression (null, "par"));
				selectLambdaExpr.ExpressionBody = selectClause.Projection;
				TypeReference typeRef = new TypeReference ("System.Func");
				typeRef.GenericTypes.Add (TypeReference.Null);
				ResolveResult result = resolver.ResolveExpression (selectLambdaExpr, resolver.ResolvePosition, false);
				
				typeRef.GenericTypes.Add (result.ResolvedType.ConvertToTypeReference ());
				
				ObjectCreateExpression createExpression = new ObjectCreateExpression (typeRef, new List<Expression> (new Expression [] {
					null,
					selectLambdaExpr
				}));
				
				selectInvocation.Arguments.Add (createExpression);
				return CreateResult (ResolveType (selectInvocation));
			}
			
			QueryExpressionGroupClause groupClause = queryExpression.SelectOrGroupClause as QueryExpressionGroupClause;
			if (groupClause != null) {
				InvocationExpression groupInvocation = new InvocationExpression (new MemberReferenceExpression (queryExpression.FromClause.InExpression, "GroupBy"));
				
				LambdaExpression keyLambdaExpr = new LambdaExpression ();
				keyLambdaExpr.Parent = groupInvocation;
				keyLambdaExpr.Parameters.Add (new ParameterDeclarationExpression (null, "par"));
				keyLambdaExpr.ExpressionBody = groupClause.GroupBy;
				groupInvocation.Arguments.Add (keyLambdaExpr);
				
				LambdaExpression elementLambdaExpr = new LambdaExpression ();
				elementLambdaExpr.Parent = groupInvocation;
				elementLambdaExpr.Parameters.Add (new ParameterDeclarationExpression (null, "par"));
				elementLambdaExpr.ExpressionBody = groupClause.Projection;
				groupInvocation.Arguments.Add (elementLambdaExpr);
				return CreateResult (ResolveType (groupInvocation));
			}
			
			if (type != null) 
				return CreateResult (new DomReturnType("System.Collections.Generic.IEnumerable", false, new List<IReturnType> (new IReturnType[] { type })));
			return null;
		}
开发者ID:Ein,项目名称:monodevelop,代码行数:50,代码来源:ResolveVisitor.cs


示例18: VisitQueryExpression

            public override object VisitQueryExpression(QueryExpression queryExpression, object data)
            {
                UnlockWith(queryExpression);

                return base.VisitQueryExpression(queryExpression, data);
            }
开发者ID:timdams,项目名称:strokes,代码行数:6,代码来源:QueryExpressionAchievement.cs


示例19: QueryExpressionBody

	void QueryExpressionBody(
//#line  2476 "cs.ATG" 
ref QueryExpression q) {

//#line  2477 "cs.ATG" 
		QueryExpressionFromClause fromClause;     QueryExpressionWhereClause whereClause;
		QueryExpressionLetClause letClause;       QueryExpressionJoinClause joinClause;
		QueryExpressionOrderClause orderClause;
		QueryExpressionSelectClause selectClause; QueryExpressionGroupClause groupClause;
		
		while (StartOf(39)) {
			if (la.kind == 137) {
				QueryExpressionFromClause(
//#line  2483 "cs.ATG" 
out fromClause);

//#line  2483 "cs.ATG" 
				SafeAdd<QueryExpressionClause>(q, q.MiddleClauses, fromClause); 
			} else if (la.kind == 127) {
				QueryExpressionWhereClause(
//#line  2484 "cs.ATG" 
out whereClause);

//#line  2484 "cs.ATG" 
				SafeAdd<QueryExpressionClause>(q, q.MiddleClauses, whereClause); 
			} else if (la.kind == 141) {
				QueryExpressionLetClause(
//#line  2485 "cs.ATG" 
out letClause);

//#line  2485 "cs.ATG" 
				SafeAdd<QueryExpressionClause>(q, q.MiddleClauses, letClause); 
			} else if (la.kind == 142) {
				QueryExpressionJoinClause(
//#line  2486 "cs.ATG" 
out joinClause);

//#line  2486 "cs.ATG" 
				SafeAdd<QueryExpressionClause>(q, q.MiddleClauses, joinClause); 
			} else {
				QueryExpressionOrderByClause(
//#line  2487 "cs.ATG" 
out orderClause);

//#line  2487 "cs.ATG" 
				SafeAdd<QueryExpressionClause>(q, q.MiddleClauses, orderClause); 
			}
		}
		if (la.kind == 133) {
			QueryExpressionSelectClause(
//#line  2489 "cs.ATG" 
out selectClause);

//#line  2489 "cs.ATG" 
			q.SelectOrGroupClause = selectClause; 
		} else if (la.kind == 134) {
			QueryExpressionGroupClause(
//#line  2490 "cs.ATG" 
out groupClause);

//#line  2490 "cs.ATG" 
			q.SelectOrGroupClause = groupClause; 
		} else SynErr(216);
		if (la.kind == 136) {
			QueryExpressionIntoClause(
//#line  2492 "cs.ATG" 
ref q);
		}
	}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:69,代码来源:Parser.cs


示例20: VisitQueryExpression

 public virtual object VisitQueryExpression(QueryExpression queryExpression, object data)
 {
     Debug.Assert((queryExpression != null));
     Debug.Assert((queryExpression.FromClause != null));
     Debug.Assert((queryExpression.MiddleClauses != null));
     Debug.Assert((queryExpression.SelectOrGroupClause != null));
     queryExpression.FromClause.AcceptVisitor(this, data);
     foreach (QueryExpressionClause o in queryExpression.MiddleClauses) {
         Debug.Assert(o != null);
         o.AcceptVisitor(this, data);
     }
     return queryExpression.SelectOrGroupClause.AcceptVisitor(this, data);
 }
开发者ID:pusp,项目名称:o2platform,代码行数:13,代码来源:AbstractASTVisitor.cs



注:本文中的ICSharpCode.NRefactory.Ast.QueryExpression类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Ast.Statement类代码示例发布时间:2022-05-26
下一篇:
C# Ast.PropertySetRegion类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap