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


C# BoundFieldAccess.Update方法代码示例

本文整理汇总了C#中Microsoft.CodeAnalysis.CSharp.BoundFieldAccess.Update方法的典型用法代码示例。如果您正苦于以下问题:C# BoundFieldAccess.Update方法的具体用法?C# BoundFieldAccess.Update怎么用?C# BoundFieldAccess.Update使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Microsoft.CodeAnalysis.CSharp.BoundFieldAccess的用法示例。


在下文中一共展示了BoundFieldAccess.Update方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: MakeFieldAccess

        private BoundExpression MakeFieldAccess(
            CSharpSyntaxNode syntax,
            BoundExpression rewrittenReceiver,
            FieldSymbol fieldSymbol,
            ConstantValue constantValueOpt,
            LookupResultKind resultKind,
            TypeSymbol type,
            BoundFieldAccess oldNodeOpt = null)
        {

            if (fieldSymbol.IsTupleField)
            {
                return MakeTupleFieldAccess(syntax, fieldSymbol, rewrittenReceiver, constantValueOpt, resultKind);
            }
            
            BoundExpression result = oldNodeOpt != null ?
                oldNodeOpt.Update(rewrittenReceiver, fieldSymbol, constantValueOpt, resultKind, type) :
                new BoundFieldAccess(syntax, rewrittenReceiver, fieldSymbol, constantValueOpt, resultKind, type);

            if (fieldSymbol.IsFixed)
            {
                // a reference to a fixed buffer is translated into its address
                result = new BoundConversion(syntax,
                    new BoundAddressOfOperator(syntax, result, syntax != null && SyntaxFacts.IsFixedStatementExpression(syntax), type, false),
                    new Conversion(ConversionKind.PointerToPointer), false, false, default(ConstantValue), type, false);
            }

            return result;
        }
开发者ID:CAPCHIK,项目名称:roslyn,代码行数:29,代码来源:LocalRewriter_Field.cs

示例2: VisitFieldAccess

 public override BoundNode VisitFieldAccess(BoundFieldAccess node)
 {
     BoundSpillSequence2 ss = null;
     var receiver = VisitExpression(ref ss, node.ReceiverOpt);
     return UpdateExpression(ss, node.Update(receiver, node.FieldSymbol, node.ConstantValueOpt, node.ResultKind, node.Type));
 }
开发者ID:EkardNT,项目名称:Roslyn,代码行数:6,代码来源:AwaitLiftingRewriter.cs

示例3: VisitFieldAccess

        public override BoundNode VisitFieldAccess(BoundFieldAccess node)
        {
            BoundExpression receiverOpt = (BoundExpression)this.Visit(node.ReceiverOpt);
            TypeSymbol type = this.VisitType(node.Type);

            if (receiverOpt == null || receiverOpt.Kind != BoundKind.SpillSequence)
            {
                return node.Update(receiverOpt, node.FieldSymbol, node.ConstantValueOpt, node.ResultKind, type);
            }

            var spill = (BoundSpillSequence)receiverOpt;
            return RewriteSpillSequence(spill,
                node.Update(
                    spill.Value,
                    node.FieldSymbol,
                    node.ConstantValueOpt,
                    node.ResultKind,
                    type));
        }
开发者ID:modulexcite,项目名称:pattern-matching-csharp,代码行数:19,代码来源:AwaitLoweringRewriterPass1_Unary.cs


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