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


C# Expressions.ListInitExpression类代码示例

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


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


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