21 references to CreateBlock
Microsoft.CodeAnalysis.CSharp.Workspaces (21)
CodeGeneration\CSharpSyntaxGenerator.cs (21)
254
body: hasBody ?
CreateBlock
(statements) : null,
277
var body = hasBody ?
CreateBlock
(statements) : null;
370
CreateBlock
(statements));
437
: accessor.WithBody(
CreateBlock
(statements));
522
statements != null ?
CreateBlock
(statements) : null);
653
return (method.Body == null && method.ExpressionBody == null) ? method.WithSemicolonToken(default).WithBody(
CreateBlock
()) : method;
678
return accessor.WithSemicolonToken(default).WithBody(
CreateBlock
(null));
2332
return ((ParenthesizedLambdaExpressionSyntax)declaration).WithBody((CSharpSyntaxNode)expr ??
CreateBlock
());
2335
return ((SimpleLambdaExpressionSyntax)declaration).WithBody((CSharpSyntaxNode)expr ??
CreateBlock
());
2502
var body =
CreateBlock
(statements);
3122
CreateBlock
(trueStatements));
3131
CreateBlock
(trueStatements),
3133
falseArray is [IfStatementSyntax ifStatement] ? ifStatement :
CreateBlock
(falseArray)));
3502
statement:
CreateBlock
(statements));
3510
statement:
CreateBlock
(statements));
3517
statement:
CreateBlock
(statements));
3523
CreateBlock
(tryStatements),
3525
finallyStatements != null ? SyntaxFactory.FinallyClause(
CreateBlock
(finallyStatements)) : null);
3533
block:
CreateBlock
(statements));
3537
=> SyntaxFactory.WhileStatement((ExpressionSyntax)condition,
CreateBlock
(statements));
3610
=> this.ValueReturningLambdaExpression(parameterDeclarations,
CreateBlock
(statements));