21 references to CreateBlock
Microsoft.CodeAnalysis.CSharp.Workspaces (21)
CodeGeneration\CSharpSyntaxGenerator.cs (21)
252
body: hasBody ?
CreateBlock
(statements) : null,
275
var body = hasBody ?
CreateBlock
(statements) : null;
368
CreateBlock
(statements));
435
: accessor.WithBody(
CreateBlock
(statements));
520
statements != null ?
CreateBlock
(statements) : null);
651
return (method.Body == null && method.ExpressionBody == null) ? method.WithSemicolonToken(default).WithBody(
CreateBlock
()) : method;
676
return accessor.WithSemicolonToken(default).WithBody(
CreateBlock
(null));
2309
return ((ParenthesizedLambdaExpressionSyntax)declaration).WithBody((CSharpSyntaxNode)expr ??
CreateBlock
());
2312
return ((SimpleLambdaExpressionSyntax)declaration).WithBody((CSharpSyntaxNode)expr ??
CreateBlock
());
2488
var body =
CreateBlock
(statements, existingBlock, addSimplifierAnnotation: false);
3088
CreateBlock
(trueStatements));
3097
CreateBlock
(trueStatements),
3099
falseArray is [IfStatementSyntax ifStatement] ? ifStatement :
CreateBlock
(falseArray)));
3483
statement:
CreateBlock
(statements));
3491
statement:
CreateBlock
(statements));
3498
statement:
CreateBlock
(statements));
3504
CreateBlock
(tryStatements),
3506
finallyStatements != null ? SyntaxFactory.FinallyClause(
CreateBlock
(finallyStatements)) : null);
3514
block:
CreateBlock
(statements));
3518
=> SyntaxFactory.WhileStatement((ExpressionSyntax)condition,
CreateBlock
(statements));
3591
=> this.ValueReturningLambdaExpression(parameterDeclarations,
CreateBlock
(statements));