SyntaxExtensions.IsEmbedded(StatementSyntax, Boolean, Boolean, Boolean) Method
Containing Type: SyntaxExtensions
Assembly: Roslynator.CSharp.dll
Returns true if the specified statement is an embedded statement.
public static bool IsEmbedded(this Microsoft.CodeAnalysis.CSharp.Syntax.StatementSyntax statement, bool canBeBlock = false, bool canBeIfInsideElse = true, bool canBeUsingInsideUsing = true)
Parameters
statement StatementSyntax
canBeBlock Boolean
Block can be considered as embedded statement
canBeIfInsideElse Boolean
If statement that is a child of an else statement can be considered as an embedded statement.
canBeUsingInsideUsing Boolean
Using statement that is a child of an using statement can be considered as en embedded statement.