21 references to CreateBlock
Microsoft.CodeAnalysis.CSharp.Workspaces (21)
CodeGeneration\CSharpSyntaxGenerator.cs (21)
246
body: hasBody ?
CreateBlock
(statements) : null,
268
var body = hasBody ?
CreateBlock
(statements) : null;
372
CreateBlock
(statements));
440
: accessor.WithBody(
CreateBlock
(statements));
527
statements != null ?
CreateBlock
(statements) : null);
658
return (method.Body == null && method.ExpressionBody == null) ? method.WithSemicolonToken(default).WithBody(
CreateBlock
()) : method;
683
return accessor.WithSemicolonToken(default).WithBody(
CreateBlock
(null));
2481
return ((ParenthesizedLambdaExpressionSyntax)declaration).WithBody((CSharpSyntaxNode)expr ??
CreateBlock
());
2484
return ((SimpleLambdaExpressionSyntax)declaration).WithBody((CSharpSyntaxNode)expr ??
CreateBlock
());
2660
var body =
CreateBlock
(statements, existingBlock, addSimplifierAnnotation: false);
3260
CreateBlock
(trueStatements));
3269
CreateBlock
(trueStatements),
3271
falseArray is [IfStatementSyntax ifStatement] ? ifStatement :
CreateBlock
(falseArray)));
3563
statement:
CreateBlock
(statements));
3571
statement:
CreateBlock
(statements));
3578
statement:
CreateBlock
(statements));
3584
CreateBlock
(tryStatements),
3586
finallyStatements != null ? SyntaxFactory.FinallyClause(
CreateBlock
(finallyStatements)) : null);
3594
block:
CreateBlock
(statements));
3598
=> SyntaxFactory.WhileStatement((ExpressionSyntax)condition,
CreateBlock
(statements));
3671
=> this.ValueReturningLambdaExpression(parameterDeclarations,
CreateBlock
(statements));