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)); } }
public static BoundBlock BindEmbeddedBlock( this Microsoft.CodeAnalysis.CSharp.Binder binder, BlockSyntax node, DiagnosticBag diagnostics ) { return(binder.BindEmbeddedBlock( node, new Microsoft.CodeAnalysis.CSharp.BindingDiagnosticBag(diagnostics) )); }
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); } }