21 references to CreateBlock
Microsoft.CodeAnalysis.CSharp.Workspaces (21)
CodeGeneration\CSharpSyntaxGenerator.cs (21)
246body: hasBody ? CreateBlock(statements) : null, 268var body = hasBody ? CreateBlock(statements) : null; 372CreateBlock(statements)); 440: accessor.WithBody(CreateBlock(statements)); 527statements != null ? CreateBlock(statements) : null); 658return method is { Body: null, ExpressionBody: null } ? method.WithSemicolonToken(default).WithBody(CreateBlock()) : method; 681? accessor.WithSemicolonToken(default).WithBody(CreateBlock(null)) 2482return ((ParenthesizedLambdaExpressionSyntax)declaration).WithBody((CSharpSyntaxNode)expr ?? CreateBlock()); 2485return ((SimpleLambdaExpressionSyntax)declaration).WithBody((CSharpSyntaxNode)expr ?? CreateBlock()); 2661var body = CreateBlock(statements, existingBlock, addSimplifierAnnotation: false); 3261CreateBlock(trueStatements)); 3270CreateBlock(trueStatements), 3272falseArray is [IfStatementSyntax ifStatement] ? ifStatement : CreateBlock(falseArray))); 3566statement: CreateBlock(statements)); 3574statement: CreateBlock(statements)); 3581statement: CreateBlock(statements)); 3587CreateBlock(tryStatements), 3589finallyStatements != null ? SyntaxFactory.FinallyClause(CreateBlock(finallyStatements)) : null); 3597block: CreateBlock(statements)); 3601=> SyntaxFactory.WhileStatement((ExpressionSyntax)condition, CreateBlock(statements)); 3674=> this.ValueReturningLambdaExpression(parameterDeclarations, CreateBlock(statements));