当前位置: 首页>>代码示例>>C#>>正文


C# ClauseGenerationContext.AddContextInfo方法代码示例

本文整理汇总了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);
        }
开发者ID:491134648,项目名称:EntityFramework,代码行数:10,代码来源:ThenIncludeExpressionNode.cs

示例2: CreateMainFromClause

    private MainFromClause CreateMainFromClause (ClauseGenerationContext clauseGenerationContext)
    {
      var fromClause = new MainFromClause (
          AssociatedIdentifier,
          QuerySourceElementType,
          ParsedExpression);

      clauseGenerationContext.AddContextInfo (this, fromClause);
      return fromClause;
    }
开发者ID:GTuritto,项目名称:BrightstarDB,代码行数:10,代码来源:MainSourceExpressionNode.cs

示例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;
        }
开发者ID:thegido,项目名称:EntityFramework,代码行数:11,代码来源:ThenIncludeExpressionNode.cs

示例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;
    }
开发者ID:GTuritto,项目名称:BrightstarDB,代码行数:12,代码来源:ThenFetchManyExpressionNode.cs

示例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;
        }
开发者ID:thegido,项目名称:EntityFramework,代码行数:14,代码来源:IncludeExpressionNode.cs

示例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;
        }
开发者ID:rbenhassine2,项目名称:EntityFramework,代码行数:16,代码来源:IncludeExpressionNode.cs

示例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;
        }
开发者ID:RickyLin,项目名称:EntityFramework,代码行数:24,代码来源:IncludeExpressionNode.cs

示例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;
    }
开发者ID:GTuritto,项目名称:BrightstarDB,代码行数:15,代码来源:GroupJoinExpressionNode.cs

示例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;
    }
开发者ID:hong1990,项目名称:Relinq,代码行数:15,代码来源:SelectManyExpressionNode.cs

示例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;
        }
开发者ID:nicocrm,项目名称:DotNetSDataClient,代码行数:15,代码来源:JoinExpressionNode.cs

示例11: CreateResultOperator

 protected override ResultOperatorBase CreateResultOperator (ClauseGenerationContext clauseGenerationContext)
 {
   var resultOperator = new FetchManyRequest (RelationMember);
   clauseGenerationContext.AddContextInfo (this, resultOperator);
   return resultOperator;
 }
开发者ID:GTuritto,项目名称:BrightstarDB,代码行数:6,代码来源:FetchManyExpressionNode.cs

示例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;
    }
开发者ID:natemcmaster,项目名称:Relinq,代码行数:16,代码来源:GroupByExpressionNode.cs

示例13: CreateResultOperator

 protected override ResultOperatorBase CreateResultOperator (ClauseGenerationContext clauseGenerationContext)
 {
   var resultOperator = new UnionResultOperator (AssociatedIdentifier, ItemType, Source2);
   clauseGenerationContext.AddContextInfo (this, resultOperator);
   return resultOperator;
 }
开发者ID:hong1990,项目名称:Relinq,代码行数:6,代码来源:UnionExpressionNode.cs

示例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);
        }
开发者ID:RossMerr,项目名称:CouchbaseNetLinq,代码行数:16,代码来源:NestExpressionNode.cs

示例15: CreateResultOperator

 protected sealed override ResultOperatorBase CreateResultOperator (ClauseGenerationContext clauseGenerationContext)
 {
   var resultOperator = CreateSpecificResultOperator();
   clauseGenerationContext.AddContextInfo (this, resultOperator);
   return resultOperator;
 }
开发者ID:natemcmaster,项目名称:Relinq,代码行数:6,代码来源:QuerySourceSetOperationExpressionNodeBase.cs


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