本文整理汇总了C#中Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext类的典型用法代码示例。如果您正苦于以下问题:C# ClauseGenerationContext类的具体用法?C# ClauseGenerationContext怎么用?C# ClauseGenerationContext使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ClauseGenerationContext类属于Remotion.Linq.Parsing.Structure.IntermediateModel命名空间,在下文中一共展示了ClauseGenerationContext类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ApplyNodeSpecificSemantics
protected override QueryModel ApplyNodeSpecificSemantics(QueryModel queryModel,
ClauseGenerationContext clauseGenerationContext)
{
queryModel.BodyClauses.Add(new UseKeysClause(Keys));
return queryModel;
}
示例2: ApplyAllNodes
private QueryModel ApplyAllNodes(IExpressionNode node, ClauseGenerationContext clauseGenerationContext)
{
QueryModel queryModel = null;
if (node.Source != null)
queryModel = ApplyAllNodes(node.Source, clauseGenerationContext);
return node.Apply(queryModel, clauseGenerationContext);
}
示例3: ApplyNodeSpecificSemantics
protected override void ApplyNodeSpecificSemantics (QueryModel queryModel, ClauseGenerationContext clauseGenerationContext)
{
ArgumentUtility.CheckNotNull ("queryModel", queryModel);
var clause = new WhereClause (GetResolvedPredicate (clauseGenerationContext));
queryModel.BodyClauses.Add (clause);
}
示例4: Resolve
public override Expression Resolve(ParameterExpression inputParameter, Expression expressionToBeResolved, ClauseGenerationContext clauseGenerationContext)
{
ArgumentUtility.CheckNotNull("inputParameter", inputParameter);
ArgumentUtility.CheckNotNull("expressionToBeResolved", expressionToBeResolved);
ArgumentUtility.CheckNotNull("clauseGenerationContext", clauseGenerationContext);
return Source.Resolve(inputParameter, expressionToBeResolved, clauseGenerationContext);
}
示例5: ApplyNodeSpecificSemantics
protected override QueryModel ApplyNodeSpecificSemantics(QueryModel queryModel,
ClauseGenerationContext clauseGenerationContext)
{
queryModel.BodyClauses.Add(new WhereMissingClause(GetResolvedPredicate(clauseGenerationContext)));
return queryModel;
}
示例6: ApplyNodeSpecificSemantics
protected override QueryModel ApplyNodeSpecificSemantics(QueryModel queryModel, ClauseGenerationContext clauseGenerationContext)
{
ArgumentUtility.CheckNotNull ("queryModel", queryModel);
var resultOperator = CreateResultOperator (clauseGenerationContext);
queryModel.ResultOperators.Add (resultOperator);
return queryModel;
}
示例7: Resolve
public override Expression Resolve(
ParameterExpression inputParameter,
Expression expressionToBeResolved,
ClauseGenerationContext clauseGenerationContext)
=> Source.Resolve(
inputParameter,
expressionToBeResolved,
clauseGenerationContext);
示例8: ApplyNodeSpecificSemantics
protected override void ApplyNodeSpecificSemantics (QueryModel queryModel, ClauseGenerationContext clauseGenerationContext)
{
ArgumentUtility.CheckNotNull ("queryModel", queryModel);
var clause = new OrderByClause();
clause.Orderings.Add (new Ordering (GetResolvedKeySelector (clauseGenerationContext), OrderingDirection.Desc));
queryModel.BodyClauses.Add (clause);
}
示例9: Resolve
public override Expression Resolve (ParameterExpression inputParameter, Expression expressionToBeResolved, ClauseGenerationContext clauseGenerationContext)
{
ArgumentUtility.CheckNotNull ("inputParameter", inputParameter);
ArgumentUtility.CheckNotNull ("expressionToBeResolved", expressionToBeResolved);
// UnionResultOperator is a query source, so expressions reolve their input parameter with the UnionResultOperator created by this node.
return QuerySourceExpressionNodeUtility.ReplaceParameterWithReference (this, inputParameter, expressionToBeResolved, clauseGenerationContext);
}
示例10: WrapQueryModelAfterEndOfQuery
protected sealed override QueryModel WrapQueryModelAfterEndOfQuery (QueryModel queryModel, ClauseGenerationContext clauseGenerationContext)
{
ArgumentUtility.CheckNotNull ("queryModel", queryModel);
// Result operators can safely be appended to the previous query model even after another result operator, so do not wrap the previous
// query model.
return queryModel;
}
示例11: ApplyNodeSpecificSemantics
protected override void ApplyNodeSpecificSemantics (QueryModel queryModel, ClauseGenerationContext clauseGenerationContext)
{
//NOTE: Do not seal ApplyNodeSpecificSemantics() in ResultOperatorExpressionNodeBase. It is overridden by e.g. Fetch-operators.
ArgumentUtility.CheckNotNull ("queryModel", queryModel);
var resultOperator = CreateResultOperator (clauseGenerationContext);
queryModel.ResultOperators.Add (resultOperator);
}
示例12: Resolve
public override Expression Resolve (ParameterExpression inputParameter, Expression expressionToBeResolved, ClauseGenerationContext clauseGenerationContext)
{
ArgumentUtility.CheckNotNull ("inputParameter", inputParameter);
ArgumentUtility.CheckNotNull ("expressionToBeResolved", expressionToBeResolved);
// no data streams out from this node, so we cannot resolve any expressions
throw CreateResolveNotSupportedException ();
}
示例13: Resolve
public override Expression Resolve (ParameterExpression inputParameter, Expression expressionToBeResolved, ClauseGenerationContext clauseGenerationContext)
{
ArgumentUtility.CheckNotNull ("inputParameter", inputParameter);
ArgumentUtility.CheckNotNull ("expressionToBeResolved", expressionToBeResolved);
// this simply streams its input data to the output without modifying its structure, so we resolve by passing on the data to the previous node
return Source.Resolve (inputParameter, expressionToBeResolved, clauseGenerationContext);
}
示例14: GetResolvedOptionalElementSelector
public Expression GetResolvedOptionalElementSelector (ClauseGenerationContext clauseGenerationContext)
{
if (_optionalElementSelector == null)
return null;
return _cachedElementSelector.GetOrCreate (
r => r.GetResolvedExpression (_optionalElementSelector.Body, _optionalElementSelector.Parameters[0], clauseGenerationContext));
}
示例15: Apply
public QueryModel Apply (QueryModel queryModel, ClauseGenerationContext clauseGenerationContext)
{
if (queryModel != null)
throw new ArgumentException ("QueryModel has to be null because MainSourceExpressionNode marks the start of a query.", "queryModel");
var mainFromClause = CreateMainFromClause (clauseGenerationContext);
var defaultSelectClause = new SelectClause (new QuerySourceReferenceExpression (mainFromClause));
return new QueryModel (mainFromClause, defaultSelectClause) { ResultTypeOverride = QuerySourceType };
}