本文整理汇总了C#中Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext.AddContextInfo方法的典型用法代码示例。如果您正苦于以下问题:C# ClauseGenerationContext.AddContextInfo方法的具体用法?C# ClauseGenerationContext.AddContextInfo怎么用?C# ClauseGenerationContext.AddContextInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Remotion.Linq.Parsing.Structure.IntermediateModel.ClauseGenerationContext
的用法示例。
在下文中一共展示了ClauseGenerationContext.AddContextInfo方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ApplyNodeSpecificSemantics
protected override void ApplyNodeSpecificSemantics(QueryModel queryModel, ClauseGenerationContext clauseGenerationContext)
{
var queryAnnotationResultOperator
= (QueryAnnotationResultOperator)clauseGenerationContext.GetContextInfo(Source);
((IncludeQueryAnnotation)queryAnnotationResultOperator.Annotation)
.AppendToNavigationPath(_navigationPropertyPathLambda.GetComplexPropertyAccess());
clauseGenerationContext.AddContextInfo(this, queryAnnotationResultOperator);
}
示例2: CreateMainFromClause
private MainFromClause CreateMainFromClause (ClauseGenerationContext clauseGenerationContext)
{
var fromClause = new MainFromClause (
AssociatedIdentifier,
QuerySourceElementType,
ParsedExpression);
clauseGenerationContext.AddContextInfo (this, fromClause);
return fromClause;
}
示例3: ApplyNodeSpecificSemantics
protected override QueryModel ApplyNodeSpecificSemantics(QueryModel queryModel, ClauseGenerationContext clauseGenerationContext)
{
var includeResultOperator
= (IncludeResultOperator)clauseGenerationContext.GetContextInfo(Source);
includeResultOperator.AppendToNavigationPath(_navigationPropertyPathLambda.GetComplexPropertyAccess());
clauseGenerationContext.AddContextInfo(this, includeResultOperator);
return queryModel;
}
示例4: ApplyNodeSpecificSemantics
protected override QueryModel ApplyNodeSpecificSemantics (QueryModel queryModel, ClauseGenerationContext clauseGenerationContext)
{
var previousFetchRequest = clauseGenerationContext.GetContextInfo (Source) as FetchRequestBase;
if (previousFetchRequest == null)
throw new ParserException ("ThenFetchMany must directly follow another Fetch request.");
FetchRequestBase innerFetchRequest = new FetchManyRequest (RelationMember);
innerFetchRequest = previousFetchRequest.GetOrAddInnerFetchRequest (innerFetchRequest);
clauseGenerationContext.AddContextInfo (this, innerFetchRequest);
return queryModel;
}
示例5: CreateResultOperator
protected override ResultOperatorBase CreateResultOperator(ClauseGenerationContext clauseGenerationContext)
{
var navigationPropertyPath
= Source.Resolve(
_navigationPropertyPathLambda.Parameters[0],
_navigationPropertyPathLambda.Body,
clauseGenerationContext);
var includeResultOperator = new IncludeResultOperator(navigationPropertyPath);
clauseGenerationContext.AddContextInfo(this, includeResultOperator);
return includeResultOperator;
}
示例6: CreateResultOperator
protected override ResultOperatorBase CreateResultOperator(ClauseGenerationContext clauseGenerationContext)
{
var navigationPropertyPath
= Source.Resolve(
_navigationPropertyPathLambda.Parameters[0],
_navigationPropertyPathLambda.Body,
clauseGenerationContext);
var queryAnnotationResultOperator = new QueryAnnotationResultOperator(
Expression.Constant(
new IncludeQueryAnnotation(navigationPropertyPath)));
clauseGenerationContext.AddContextInfo(this, queryAnnotationResultOperator);
return queryAnnotationResultOperator;
}
示例7: CreateResultOperator
/// <summary>
/// This API supports the Entity Framework Core infrastructure and is not intended to be used
/// directly from your code. This API may change or be removed in future releases.
/// </summary>
protected override ResultOperatorBase CreateResultOperator(ClauseGenerationContext clauseGenerationContext)
{
var navigationPropertyPath
= Source.Resolve(
_navigationPropertyPathLambda.Parameters[0],
_navigationPropertyPathLambda.Body,
clauseGenerationContext) as MemberExpression;
if (navigationPropertyPath == null)
{
throw new InvalidOperationException(
CoreStrings.InvalidComplexPropertyExpression(_navigationPropertyPathLambda));
}
var includeResultOperator = new IncludeResultOperator(navigationPropertyPath);
clauseGenerationContext.AddContextInfo(this, includeResultOperator);
return includeResultOperator;
}
示例8: ApplyNodeSpecificSemantics
protected override QueryModel ApplyNodeSpecificSemantics (QueryModel queryModel, ClauseGenerationContext clauseGenerationContext)
{
ArgumentUtility.CheckNotNull ("queryModel", queryModel);
var joinClause = JoinExpressionNode.CreateJoinClause (clauseGenerationContext);
var groupJoinClause = new GroupJoinClause (ResultSelector.Parameters[1].Name, ResultSelector.Parameters[1].Type, joinClause);
clauseGenerationContext.AddContextInfo (this, groupJoinClause);
queryModel.BodyClauses.Add (groupJoinClause);
var selectClause = queryModel.SelectClause;
selectClause.Selector = GetResolvedResultSelector (clauseGenerationContext);
return queryModel;
}
示例9: ApplyNodeSpecificSemantics
protected override QueryModel ApplyNodeSpecificSemantics (QueryModel queryModel, ClauseGenerationContext clauseGenerationContext)
{
ArgumentUtility.CheckNotNull ("queryModel", queryModel);
var resolvedCollectionSelector = GetResolvedCollectionSelector (clauseGenerationContext);
var clause = new AdditionalFromClause (ResultSelector.Parameters[1].Name, ResultSelector.Parameters[1].Type, resolvedCollectionSelector);
queryModel.BodyClauses.Add (clause);
clauseGenerationContext.AddContextInfo (this, clause);
var selectClause = queryModel.SelectClause;
selectClause.Selector = GetResolvedResultSelector (clauseGenerationContext);
return queryModel;
}
示例10: CreateJoinClause
public JoinClause CreateJoinClause(ClauseGenerationContext clauseGenerationContext)
{
var dummyInnerKeySelector = Expression.Constant (null);
var joinClause = new JoinClause (
ResultSelector.Parameters[1].Name,
ResultSelector.Parameters[1].Type,
InnerSequence,
GetResolvedOuterKeySelector (clauseGenerationContext),
dummyInnerKeySelector);
clauseGenerationContext.AddContextInfo (this, joinClause);
joinClause.InnerKeySelector = GetResolvedInnerKeySelector (clauseGenerationContext);
return joinClause;
}
示例11: CreateResultOperator
protected override ResultOperatorBase CreateResultOperator (ClauseGenerationContext clauseGenerationContext)
{
var resultOperator = new FetchManyRequest (RelationMember);
clauseGenerationContext.AddContextInfo (this, resultOperator);
return resultOperator;
}
示例12: CreateResultOperator
protected override ResultOperatorBase CreateResultOperator (ClauseGenerationContext clauseGenerationContext)
{
var resolvedKeySelector = GetResolvedKeySelector (clauseGenerationContext);
var resolvedElementSelector = GetResolvedOptionalElementSelector (clauseGenerationContext);
if (resolvedElementSelector == null)
{
// supply a default element selector if none is given
// just resolve KeySelector.Parameters[0], that's the input data flowing in from the source node
resolvedElementSelector = Source.Resolve (_keySelector.Parameters[0], _keySelector.Parameters[0], clauseGenerationContext);
}
var resultOperator = new GroupResultOperator (AssociatedIdentifier, resolvedKeySelector, resolvedElementSelector);
clauseGenerationContext.AddContextInfo (this, resultOperator);
return resultOperator;
}
示例13: CreateResultOperator
protected override ResultOperatorBase CreateResultOperator (ClauseGenerationContext clauseGenerationContext)
{
var resultOperator = new UnionResultOperator (AssociatedIdentifier, ItemType, Source2);
clauseGenerationContext.AddContextInfo (this, resultOperator);
return resultOperator;
}
示例14: ApplyNodeSpecificSemantics
protected override void ApplyNodeSpecificSemantics(QueryModel queryModel,
ClauseGenerationContext clauseGenerationContext)
{
var nestClause = new NestClause(
ResultSelector.Parameters[1].Name,
ResultSelector.Parameters[1].Type,
InnerSequence,
GetResolvedKeySelector(clauseGenerationContext),
IsLeftOuterNest);
clauseGenerationContext.AddContextInfo(this, nestClause);
queryModel.BodyClauses.Add(nestClause);
var selectClause = queryModel.SelectClause;
selectClause.Selector = GetResolvedResultSelector(clauseGenerationContext);
}
示例15: CreateResultOperator
protected sealed override ResultOperatorBase CreateResultOperator (ClauseGenerationContext clauseGenerationContext)
{
var resultOperator = CreateSpecificResultOperator();
clauseGenerationContext.AddContextInfo (this, resultOperator);
return resultOperator;
}