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));
2322
return ((ParenthesizedLambdaExpressionSyntax)declaration).WithBody((CSharpSyntaxNode)expr ??
CreateBlock
());
2325
return ((SimpleLambdaExpressionSyntax)declaration).WithBody((CSharpSyntaxNode)expr ??
CreateBlock
());
2501
var body =
CreateBlock
(statements, existingBlock, addSimplifierAnnotation: false);
3101
CreateBlock
(trueStatements));
3110
CreateBlock
(trueStatements),
3112
falseArray is [IfStatementSyntax ifStatement] ? ifStatement :
CreateBlock
(falseArray)));
3404
statement:
CreateBlock
(statements));
3412
statement:
CreateBlock
(statements));
3419
statement:
CreateBlock
(statements));
3425
CreateBlock
(tryStatements),
3427
finallyStatements != null ? SyntaxFactory.FinallyClause(
CreateBlock
(finallyStatements)) : null);
3435
block:
CreateBlock
(statements));
3439
=> SyntaxFactory.WhileStatement((ExpressionSyntax)condition,
CreateBlock
(statements));
3512
=> this.ValueReturningLambdaExpression(parameterDeclarations,
CreateBlock
(statements));