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));
2478
return ((ParenthesizedLambdaExpressionSyntax)declaration).WithBody((CSharpSyntaxNode)expr ??
CreateBlock
());
2481
return ((SimpleLambdaExpressionSyntax)declaration).WithBody((CSharpSyntaxNode)expr ??
CreateBlock
());
2657
var body =
CreateBlock
(statements, existingBlock, addSimplifierAnnotation: false);
3257
CreateBlock
(trueStatements));
3266
CreateBlock
(trueStatements),
3268
falseArray is [IfStatementSyntax ifStatement] ? ifStatement :
CreateBlock
(falseArray)));
3560
statement:
CreateBlock
(statements));
3568
statement:
CreateBlock
(statements));
3575
statement:
CreateBlock
(statements));
3581
CreateBlock
(tryStatements),
3583
finallyStatements != null ? SyntaxFactory.FinallyClause(
CreateBlock
(finallyStatements)) : null);
3591
block:
CreateBlock
(statements));
3595
=> SyntaxFactory.WhileStatement((ExpressionSyntax)condition,
CreateBlock
(statements));
3668
=> this.ValueReturningLambdaExpression(parameterDeclarations,
CreateBlock
(statements));