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;
368
CreateBlock
(statements));
435
: 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));
2311
return ((ParenthesizedLambdaExpressionSyntax)declaration).WithBody((CSharpSyntaxNode)expr ??
CreateBlock
());
2314
return ((SimpleLambdaExpressionSyntax)declaration).WithBody((CSharpSyntaxNode)expr ??
CreateBlock
());
2490
var body =
CreateBlock
(statements, existingBlock, addSimplifierAnnotation: false);
3090
CreateBlock
(trueStatements));
3099
CreateBlock
(trueStatements),
3101
falseArray is [IfStatementSyntax ifStatement] ? ifStatement :
CreateBlock
(falseArray)));
3392
statement:
CreateBlock
(statements));
3400
statement:
CreateBlock
(statements));
3407
statement:
CreateBlock
(statements));
3413
CreateBlock
(tryStatements),
3415
finallyStatements != null ? SyntaxFactory.FinallyClause(
CreateBlock
(finallyStatements)) : null);
3423
block:
CreateBlock
(statements));
3427
=> SyntaxFactory.WhileStatement((ExpressionSyntax)condition,
CreateBlock
(statements));
3500
=> this.ValueReturningLambdaExpression(parameterDeclarations,
CreateBlock
(statements));