22 references to WithExpressionBody
Microsoft.CodeAnalysis.CSharp (1)
Syntax.xml.Syntax.Generated.cs (1)
12389internal override BaseMethodDeclarationSyntax WithExpressionBodyCore(ArrowExpressionClauseSyntax? expressionBody) => WithExpressionBody(expressionBody);
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForMethodsHelper.cs (1)
47=> declaration.WithExpressionBody(expressionBody);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\RemoveAsyncModifier\CSharpRemoveAsyncModifierCodeFixProvider.cs (1)
40MethodDeclarationSyntax method => method.WithBody(block).WithExpressionBody(null).WithSemicolonToken(default),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\MethodGenerator.cs (1)
193.WithExpressionBody(expressionBody)
Microsoft.CodeAnalysis.CSharp.Features (8)
CodeRefactorings\ConvertLocalFunctionToMethod\CSharpConvertLocalFunctionToMethodCodeRefactoringProvider.cs (1)
310.WithExpressionBody(localFunction.ExpressionBody)
ReplacePropertyWithMethods\CSharpReplacePropertyWithMethodsService.cs (5)
145.WithExpressionBody(setAccessorDeclaration.ExpressionBody) 193.WithExpressionBody(propertyDeclaration.ExpressionBody) 205.WithExpressionBody(getAccessorDeclaration.ExpressionBody) 264.WithExpressionBody(arrowExpression) 274return methodDeclaration.WithExpressionBody(null)
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForMethodsHelper.cs (1)
47=> declaration.WithExpressionBody(expressionBody);
src\Analyzers\CSharp\CodeFixes\RemoveAsyncModifier\CSharpRemoveAsyncModifierCodeFixProvider.cs (1)
40MethodDeclarationSyntax method => method.WithBody(block).WithExpressionBody(null).WithSemicolonToken(default),
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Generated\Syntax.Test.xml.Generated.cs (1)
13436var newNode = node.WithAttributeLists(node.AttributeLists).WithModifiers(node.Modifiers).WithReturnType(node.ReturnType).WithExplicitInterfaceSpecifier(node.ExplicitInterfaceSpecifier).WithIdentifier(node.Identifier).WithTypeParameterList(node.TypeParameterList).WithParameterList(node.ParameterList).WithConstraintClauses(node.ConstraintClauses).WithBody(node.Body).WithExpressionBody(node.ExpressionBody).WithSemicolonToken(node.SemicolonToken);
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
CodeGeneration\CSharpSyntaxGenerator.cs (1)
826.WithExpressionBody(null);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\MethodGenerator.cs (1)
193.WithExpressionBody(expressionBody)
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (4)
CodeGeneration\SyntaxGeneratorTests.cs (4)
1320.WithExpressionBody( 2934method = method.WithExpressionBody(ArrowExpressionClause((ExpressionSyntax)Generator.IdentifierName("x"))); 3449method = method.WithExpressionBody(ArrowExpressionClause((ExpressionSyntax)Generator.IdentifierName("x"))); 3485method = method.WithExpressionBody(ArrowExpressionClause((ExpressionSyntax)Generator.IdentifierName("x")));
Microsoft.Interop.ComInterfaceGenerator (2)
ComMethodContext.cs (2)
130.WithExpressionBody(ArrowExpressionClause( 149.WithExpressionBody(
Roslyn.Diagnostics.CSharp.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\MethodGenerator.cs (1)
193.WithExpressionBody(expressionBody)