SyntaxExtensions.BodyOrExpressionBody Method
Containing Type: SyntaxExtensions
Assembly: Roslynator.CSharp.dll
Overloads
Method | Summary |
---|---|
BodyOrExpressionBody(AccessorDeclarationSyntax) | Returns accessor body or an expression body if the body is null. |
BodyOrExpressionBody(ConstructorDeclarationSyntax) | Returns constructor body or an expression body if the body is null. |
BodyOrExpressionBody(ConversionOperatorDeclarationSyntax) | Returns conversion operator body or an expression body if the body is null. |
BodyOrExpressionBody(DestructorDeclarationSyntax) | Returns destructor body or an expression body if the body is null. |
BodyOrExpressionBody(LocalFunctionStatementSyntax) | Returns local function body or an expression body if the body is null. |
BodyOrExpressionBody(MethodDeclarationSyntax) | Returns method body or an expression body if the body is null. |
BodyOrExpressionBody(OperatorDeclarationSyntax) | Returns operator body or an expression body if the body is null. |
BodyOrExpressionBody(AccessorDeclarationSyntax)
Returns accessor body or an expression body if the body is null.
public static Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode? BodyOrExpressionBody(this Microsoft.CodeAnalysis.CSharp.Syntax.AccessorDeclarationSyntax accessorDeclaration)
Parameters
accessorDeclaration AccessorDeclarationSyntax
Returns
BodyOrExpressionBody(ConstructorDeclarationSyntax)
Returns constructor body or an expression body if the body is null.
public static Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode? BodyOrExpressionBody(this Microsoft.CodeAnalysis.CSharp.Syntax.ConstructorDeclarationSyntax constructorDeclaration)
Parameters
constructorDeclaration ConstructorDeclarationSyntax
Returns
BodyOrExpressionBody(ConversionOperatorDeclarationSyntax)
Returns conversion operator body or an expression body if the body is null.
public static Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode? BodyOrExpressionBody(this Microsoft.CodeAnalysis.CSharp.Syntax.ConversionOperatorDeclarationSyntax conversionOperatorDeclaration)
Parameters
conversionOperatorDeclaration ConversionOperatorDeclarationSyntax
Returns
BodyOrExpressionBody(DestructorDeclarationSyntax)
Returns destructor body or an expression body if the body is null.
public static Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode? BodyOrExpressionBody(this Microsoft.CodeAnalysis.CSharp.Syntax.DestructorDeclarationSyntax destructorDeclaration)
Parameters
destructorDeclaration DestructorDeclarationSyntax
Returns
BodyOrExpressionBody(LocalFunctionStatementSyntax)
Returns local function body or an expression body if the body is null.
public static Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode? BodyOrExpressionBody(this Microsoft.CodeAnalysis.CSharp.Syntax.LocalFunctionStatementSyntax localFunctionStatement)
Parameters
localFunctionStatement LocalFunctionStatementSyntax
Returns
BodyOrExpressionBody(MethodDeclarationSyntax)
Returns method body or an expression body if the body is null.
public static Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode? BodyOrExpressionBody(this Microsoft.CodeAnalysis.CSharp.Syntax.MethodDeclarationSyntax methodDeclaration)
Parameters
methodDeclaration MethodDeclarationSyntax
Returns
BodyOrExpressionBody(OperatorDeclarationSyntax)
Returns operator body or an expression body if the body is null.
public static Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode? BodyOrExpressionBody(this Microsoft.CodeAnalysis.CSharp.Syntax.OperatorDeclarationSyntax operatorDeclaration)
Parameters
operatorDeclaration OperatorDeclarationSyntax