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

C# Expressions.ListInitExpression类代码示例

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

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



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

示例1: UpdateListInit

 protected ListInitExpression UpdateListInit(ListInitExpression init, NewExpression nex, IEnumerable<ElementInit> initializers)
 {
     if (nex != init.NewExpression || initializers != init.Initializers) {
         return Expression.ListInit(nex, initializers);
     }
     return init;
 }
开发者ID:kpfaulkner,项目名称:Linq-To-Search,代码行数:7,代码来源:ExpressionVisitor.cs


示例2: UpdateListInit

 protected static ListInitExpression UpdateListInit(ListInitExpression node, NewExpression nex,
                                                    IEnumerable<ElementInit> initializers)
 {
     if (node.NewExpression != nex || node.Initializers != initializers)
     {
         return Expression.ListInit(nex, initializers);
     }
     return node;
 }
开发者ID:sprucemedia,项目名称:oinq,代码行数:9,代码来源:ExpressionVisitor.cs


示例3: VisitListInit

 protected override Expression VisitListInit(ListInitExpression node)
 {
     // If we here, than eval the whole block failed, don't touch constructor!
     _allowEval = false;
     var newExpr = VisitAndConvert(node.NewExpression, "VisitListInit");
     _allowEval = true;
     // ReSharper disable once AssignNullToNotNullAttribute
     return node.Update(newExpr, Visit(node.Initializers, VisitElementInit));
 }
开发者ID:respu,项目名称:SimplyFast,代码行数:9,代码来源:PartialEvaluator.cs


示例4: VisitListInit

 internal override Expression VisitListInit(ListInitExpression init)
 {
     throw new NotSupportedException(Strings.ALinq_ExpressionNotSupportedInProjectionToEntity(this.type, init.ToString()));
 }
开发者ID:JianwenSun,项目名称:cc,代码行数:4,代码来源:ProjectionAnalyzer.cs


示例5: VisitListInit

 internal override Expression VisitListInit(ListInitExpression init)
 {
     throw new NotSupportedException(Strings.ALinq_ListInitNotSupported);
 }
开发者ID:nlhepler,项目名称:mono,代码行数:4,代码来源:UriWriter.cs


示例6: VisitListInit

 protected virtual System.Linq.Expressions.Expression VisitListInit(ListInitExpression init)
 {
     NewExpression n = VisitNew(init.NewExpression);
     IEnumerable<ElementInit> initializers = VisitElementInitializerList(init.Initializers);
     // ReSharper disable once PossibleUnintendedReferenceComparison
     if(n != init.NewExpression || initializers != init.Initializers)
     {
         return System.Linq.Expressions.Expression.ListInit(n, initializers);
     }
     return init;
 }
开发者ID:NatashaSchutte,项目名称:Warewolf-ESB,代码行数:11,代码来源:ExpressionVisitor.cs


示例7: Visit

 public virtual void Visit(ListInitExpression expression) {
     if (VisitListInit != null)
         VisitListInit(expression);
 }
开发者ID:Jo1nes,项目名称:SolrNet,代码行数:4,代码来源:ExpressionVisitorV.cs


示例8: VisitListInit

 protected override Expression VisitListInit(ListInitExpression init)
 {
     this.Visit(init.NewExpression);
     this.Write(" {");
     this.WriteLine(Indentation.Inner);
     this.VisitElementInitializerList(init.Initializers);
     this.WriteLine(Indentation.Outer);
     this.Write("}");
     return init;
 }
开发者ID:PaybackMan,项目名称:Cinder,代码行数:10,代码来源:ExpressionWriter.cs


示例9: VisitListInit

        /// <summary>
        /// Visit a list initializatio expression.
        /// </summary>
        /// <param name="listInitExp"></param>
        /// <returns></returns>
        protected virtual Expression VisitListInit(ListInitExpression listInitExp)
        {
            NewExpression n = VisitNew(listInitExp.NewExpression);
            IEnumerable<ElementInit> initializers = VisitElementInitializerList(listInitExp.Initializers);

            return n != listInitExp.NewExpression || initializers != listInitExp.Initializers
                       ? Expression.ListInit(n, initializers)
                       : listInitExp;
        }
开发者ID:jd-pantheon,项目名称:Titan-Framework-v2,代码行数:14,代码来源:ExpressionVisitor.cs


示例10: ListInitExpressionMutator

 public ListInitExpressionMutator(ListInitExpression expression)
 {
     ListInitExpression = expression;
 }
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:4,代码来源:ListInitExpressionMutator.cs


示例11: VisitListInit

 internal virtual Expression VisitListInit(ListInitExpression init)
 {
     var n = VisitNew(init.NewExpression);
     var initializers = VisitElementInitializerList(init.Initializers);
     if (n != init.NewExpression
         || initializers != init.Initializers)
     {
         return Expression.ListInit(n, initializers);
     }
     return init;
 }
开发者ID:Cireson,项目名称:EntityFramework6,代码行数:11,代码来源:EntityExpressionVisitor.cs


示例12: VisitListInit

 protected virtual Expression VisitListInit(ListInitExpression init, Stack<string> stack, Stack<IElasticPropertyAttribute> properties)
 {
     NewExpression n = this.VisitNew(init.NewExpression, stack, properties);
     IEnumerable<ElementInit> initializers = this.VisitElementInitializerList(init.Initializers, stack, properties);
     if (n != init.NewExpression || initializers != init.Initializers)
     {
         return Expression.ListInit(n, initializers);
     }
     return init;
 }
开发者ID:herqueles3,项目名称:elasticsearch-net,代码行数:10,代码来源:ExpressionVisitor.cs


示例13: VisitListInit

 /// <summary>
 /// Visits a ListInitExpression.
 /// </summary>
 /// <param name="node">The ListInitExpression.</param>
 /// <returns>The ListInitExpression (possibly modified).</returns>
 protected virtual Expression VisitListInit(ListInitExpression node)
 {
     NewExpression n = VisitNew(node.NewExpression);
     IEnumerable<ElementInit> initializers = VisitElementInitList(node.Initializers);
     return UpdateListInit(node, n, initializers);
 }
开发者ID:sprucemedia,项目名称:oinq,代码行数:11,代码来源:ExpressionVisitor.cs


示例14: ListInitExpressionProxy

 public ListInitExpressionProxy(ListInitExpression node) {
     _node = node;
 }
开发者ID:jcteague,项目名称:ironruby,代码行数:3,代码来源:Expression.DebuggerProxy.cs


示例15: WriteEx

 private static IList<string> WriteEx(ListInitExpression expression, string header, int depth)
 {
     var lines = new List<string> { WriteHeader(expression, header, depth++) };
     lines.AddRange(Write(expression.NewExpression, "New", depth));
     for (int i = 0; i < expression.Initializers.Count; i++)
     {
         lines.Add(WriteLiteral(expression.Initializers[i].AddMethod.Name, string.Format("Method{0:0##}", i), depth));
         for (int j = 0; j < expression.Initializers[i].Arguments.Count; j++)
         {
             lines.AddRange(Write(expression.Initializers[i].Arguments[j], string.Format("#{0:0##}", j), depth + 1));
         }
     }
     return lines;
 }
开发者ID:xzkmxd,项目名称:mono,代码行数:14,代码来源:TextWriterExtension.cs


示例16: VisitListInit

 internal override Expression VisitListInit(ListInitExpression init)
 {
     throw new NotSupportedException(string.Format(CultureInfo.CurrentCulture, SR.ALinqExpressionNotSupportedInProjectionToEntity, this.type, init.ToString()));
 }
开发者ID:huoxudong125,项目名称:azure-sdk-for-net,代码行数:4,代码来源:ProjectionAnalyzer.cs


示例17: VisitListInit

 /// <summary>
 /// Visits a ListInitExpression.
 /// </summary>
 /// <param name="node">The ListInitExpression.</param>
 /// <returns>The ListInitExpression.</returns>
 protected override Expression VisitListInit(ListInitExpression node)
 {
     _sb.Append("<ListInitExpression>");
     return node;
 }
开发者ID:Bogdan0x400,项目名称:mongo-csharp-driver,代码行数:10,代码来源:ExpressionFormatter.cs


示例18: VisitListInit

 /// <summary>
 /// ListInitExpression visit method
 /// </summary>
 /// <param name="init">The ListInitExpression to visit</param>
 /// <returns>The visited ListInitExpression</returns>
 internal override Expression VisitListInit(ListInitExpression init)
 {
     this.cantTranslateExpression = true;
     return init;
 }
开发者ID:AlineGuan,项目名称:odata.net,代码行数:10,代码来源:ExpressionWriter.cs


示例19: VisitListInit

 /// <summary>
 /// ListInitExpression visit method
 /// </summary>
 /// <param name="init">The ListInitExpression to visit</param>
 /// <returns>The visited ListInitExpression</returns>
 internal override Expression VisitListInit(ListInitExpression init)
 {
     throw new NotImplementedException();
 }
开发者ID:larsenjo,项目名称:odata.net,代码行数:9,代码来源:NonClrExpressionTreeToXmlSerializer.cs


示例20: IsEvaluatableListInit

    public virtual bool IsEvaluatableListInit (ListInitExpression node)
    {
      ArgumentUtility.CheckNotNull ("node", node);

      return true;
    }
开发者ID:natemcmaster,项目名称:Relinq,代码行数:6,代码来源:EvaluatableExpressionFilterBase.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# Expressions.MemberAssignment类代码示例发布时间:2022-05-26
下一篇:
C# Expressions.LambdaExpression类代码示例发布时间: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