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;
379
CreateBlock
(statements));
446
: accessor.WithBody(
CreateBlock
(statements));
533
statements != null ?
CreateBlock
(statements) : null);
664
return (method.Body == null && method.ExpressionBody == null) ? method.WithSemicolonToken(default).WithBody(
CreateBlock
()) : method;
689
return accessor.WithSemicolonToken(default).WithBody(
CreateBlock
(null));
2487
return ((ParenthesizedLambdaExpressionSyntax)declaration).WithBody((CSharpSyntaxNode)expr ??
CreateBlock
());
2490
return ((SimpleLambdaExpressionSyntax)declaration).WithBody((CSharpSyntaxNode)expr ??
CreateBlock
());
2666
var body =
CreateBlock
(statements, existingBlock, addSimplifierAnnotation: false);
3266
CreateBlock
(trueStatements));
3275
CreateBlock
(trueStatements),
3277
falseArray is [IfStatementSyntax ifStatement] ? ifStatement :
CreateBlock
(falseArray)));
3569
statement:
CreateBlock
(statements));
3577
statement:
CreateBlock
(statements));
3584
statement:
CreateBlock
(statements));
3590
CreateBlock
(tryStatements),
3592
finallyStatements != null ? SyntaxFactory.FinallyClause(
CreateBlock
(finallyStatements)) : null);
3600
block:
CreateBlock
(statements));
3604
=> SyntaxFactory.WhileStatement((ExpressionSyntax)condition,
CreateBlock
(statements));
3677
=> this.ValueReturningLambdaExpression(parameterDeclarations,
CreateBlock
(statements));