示例#1
0
 protected override BoundBlock BindLambdaBody(LambdaSymbol lambdaSymbol, Binder lambdaBodyBinder, DiagnosticBag diagnostics)
 {
     if (this.IsExpressionLambda)
     {
         return(lambdaBodyBinder.BindLambdaExpressionAsBlock((ExpressionSyntax)this.Body, diagnostics));
     }
     else
     {
         return(lambdaBodyBinder.BindEmbeddedBlock((BlockSyntax)this.Body, diagnostics));
     }
 }
示例#2
0
 public static BoundBlock BindEmbeddedBlock(
     this Microsoft.CodeAnalysis.CSharp.Binder binder,
     BlockSyntax node,
     DiagnosticBag diagnostics
     )
 {
     return(binder.BindEmbeddedBlock(
                node,
                new Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag(diagnostics)
                ));
 }
示例#3
0
 protected override BoundBlock BindLambdaBody(LambdaSymbol lambdaSymbol, Binder lambdaBodyBinder, DiagnosticBag diagnostics)
 {
     if (this.IsExpressionLambda)
     {
         var refKind = this.ExpressionRefKind;
         var body = (ExpressionSyntax)this.Body;
         return lambdaBodyBinder.BindLambdaExpressionAsBlock(refKind, body, diagnostics);
     }
     else
     {
         return lambdaBodyBinder.BindEmbeddedBlock((BlockSyntax)this.Body, diagnostics);
     }
 }