本文整理汇总了C#中ICSharpCode.NRefactory.Ast.QueryExpression类的典型用法代码示例。如果您正苦于以下问题:C# QueryExpression类的具体用法?C# QueryExpression怎么用?C# QueryExpression使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
QueryExpression类属于ICSharpCode.NRefactory.Ast命名空间,在下文中一共展示了QueryExpression类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
}
示例2: VisitQueryExpression
public virtual object VisitQueryExpression(QueryExpression queryExpression, object data) {
throw new global::System.NotImplementedException("QueryExpression");
}
示例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;
}
示例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);
}
示例5: GetQueryVariableEndScope
Location GetQueryVariableEndScope(QueryExpression queryExpression)
{
return queryExpression.EndLocation;
}
示例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) */
}
示例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) */
}
示例8: QueryExpressionIntoClause
public QueryExpressionIntoClause()
{
intoIdentifier = "?";
continuedQuery = QueryExpression.Null;
}
示例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);
}
示例10: IsMatch
private bool IsMatch(QueryExpression l, QueryExpression r)
{
return l.MiddleClauses.Count == r.MiddleClauses.Count;
}
示例11: VisitQueryExpression
public override object VisitQueryExpression(QueryExpression queryExpression, object data)
{
return base.VisitQueryExpression(queryExpression, data);
}
示例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);
}
示例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;
}
示例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);
}
示例15: VisitQueryExpression
public object VisitQueryExpression(QueryExpression queryExpression, object data)
{
AddError(queryExpression, "QueryExpression is not supported.");
return null;
}