21 references to CreateBlock
Microsoft.CodeAnalysis.CSharp.Workspaces (21)
CodeGeneration\CSharpSyntaxGenerator.cs (21)
246
body: hasBody ?
CreateBlock
(statements) : null,
269
var body = hasBody ?
CreateBlock
(statements) : null;
373
CreateBlock
(statements));
441
: accessor.WithBody(
CreateBlock
(statements));
528
statements != null ?
CreateBlock
(statements) : null);
659
return (method.Body == null && method.ExpressionBody == null) ? method.WithSemicolonToken(default).WithBody(
CreateBlock
()) : method;
684
return accessor.WithSemicolonToken(default).WithBody(
CreateBlock
(null));
2485
return ((ParenthesizedLambdaExpressionSyntax)declaration).WithBody((CSharpSyntaxNode)expr ??
CreateBlock
());
2488
return ((SimpleLambdaExpressionSyntax)declaration).WithBody((CSharpSyntaxNode)expr ??
CreateBlock
());
2664
var body =
CreateBlock
(statements, existingBlock, addSimplifierAnnotation: false);
3264
CreateBlock
(trueStatements));
3273
CreateBlock
(trueStatements),
3275
falseArray is [IfStatementSyntax ifStatement] ? ifStatement :
CreateBlock
(falseArray)));
3567
statement:
CreateBlock
(statements));
3575
statement:
CreateBlock
(statements));
3582
statement:
CreateBlock
(statements));
3588
CreateBlock
(tryStatements),
3590
finallyStatements != null ? SyntaxFactory.FinallyClause(
CreateBlock
(finallyStatements)) : null);
3598
block:
CreateBlock
(statements));
3602
=> SyntaxFactory.WhileStatement((ExpressionSyntax)condition,
CreateBlock
(statements));
3675
=> this.ValueReturningLambdaExpression(parameterDeclarations,
CreateBlock
(statements));