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));
2323
return ((ParenthesizedLambdaExpressionSyntax)declaration).WithBody((CSharpSyntaxNode)expr ??
CreateBlock
());
2326
return ((SimpleLambdaExpressionSyntax)declaration).WithBody((CSharpSyntaxNode)expr ??
CreateBlock
());
2502
var body =
CreateBlock
(statements, existingBlock, addSimplifierAnnotation: false);
3102
CreateBlock
(trueStatements));
3111
CreateBlock
(trueStatements),
3113
falseArray is [IfStatementSyntax ifStatement] ? ifStatement :
CreateBlock
(falseArray)));
3405
statement:
CreateBlock
(statements));
3413
statement:
CreateBlock
(statements));
3420
statement:
CreateBlock
(statements));
3426
CreateBlock
(tryStatements),
3428
finallyStatements != null ? SyntaxFactory.FinallyClause(
CreateBlock
(finallyStatements)) : null);
3436
block:
CreateBlock
(statements));
3440
=> SyntaxFactory.WhileStatement((ExpressionSyntax)condition,
CreateBlock
(statements));
3513
=> this.ValueReturningLambdaExpression(parameterDeclarations,
CreateBlock
(statements));