386 references to Simplifier
ILLink.CodeFixProvider (4)
Microsoft.AspNetCore.App.CodeFixes (1)
Microsoft.AspNetCore.Components.Analyzers.Tests (2)
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (2)
Microsoft.AspNetCore.Mvc.Api.Analyzers (5)
Microsoft.CodeAnalysis.CodeStyle.Fixes (28)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (27)
Microsoft.CodeAnalysis.CSharp.EditorFeatures (3)
Microsoft.CodeAnalysis.CSharp.Features (37)
Microsoft.CodeAnalysis.CSharp.Workspaces (60)
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (3)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (4)
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (15)
Expansion\AbstractExpansionTest.vb (4)
37root = root.ReplaceNode(node, Await Simplifier.ExpandAsync(node, document, expandInsideNode:=Nothing, expandParameter:=expandParameter))
42root = root.ReplaceNode(node, Await Simplifier.ExpandAsync(node, document, expandInsideNode:=Nothing, expandParameter:=expandParameter))
44document = Await Simplifier.ReduceAsync(document, Simplifier.Annotation, cleanupOptions.SimplifierOptions, CancellationToken.None)
Microsoft.CodeAnalysis.Features (46)
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (18)
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (4)
Microsoft.CodeAnalysis.VisualBasic.Features (15)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (55)
Simplification\VisualBasicSimplificationService.Expander.vb (21)
117.WithAdditionalAnnotations(Simplifier.Annotation)
120Return SyntaxFactory.Parameter(newNode.AttributeLists, newNode.Modifiers, newNode.Identifier, asClause, newNode.Default).WithAdditionalAnnotations(Simplifier.Annotation)
139.WithAdditionalAnnotations(Simplifier.Annotation)
157.WithAdditionalAnnotations(Simplifier.Annotation)
181.WithAdditionalAnnotations(Simplifier.Annotation)
204.WithAdditionalAnnotations(Simplifier.Annotation)
258newMemberAccess = originalNode.Expression.CopyAnnotationsTo(newMemberAccess).WithAdditionalAnnotations(Simplifier.Annotation)
267.WithAdditionalAnnotations(Simplifier.Annotation)
275Return originalNode.CopyAnnotationsTo(replacementNode).WithAdditionalAnnotations(Simplifier.Annotation)
289.WithAdditionalAnnotations(Simplifier.Annotation)
311WithAdditionalAnnotations(Simplifier.Annotation).
343.WithAdditionalAnnotations(Simplifier.Annotation)
386WithAdditionalAnnotations(Simplifier.Annotation)
433.WithAdditionalAnnotations(Simplifier.Annotation, SimplificationHelpers.SimplifyModuleNameAnnotation),
467.WithAdditionalAnnotations(Simplifier.Annotation, SimplificationHelpers.SimplifyModuleNameAnnotation),
519.WithAdditionalAnnotations(Simplifier.Annotation)
605newNode = DirectCast(newNode, SimpleNameSyntax).WithIdentifier(identifier).WithAdditionalAnnotations(Simplifier.Annotation)
640.WithAdditionalAnnotations(Simplifier.Annotation)
676newNode = newNode.WithAdditionalAnnotations(Simplifier.Annotation)
695.WithAdditionalAnnotations(Simplifier.Annotation)
776result = rewrittenNode.CopyAnnotationsTo(SyntaxFactory.QualifiedName(DirectCast(left, NameSyntax), right.WithAdditionalAnnotations(Simplifier.SpecialTypeAnnotation)))
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (2)
Microsoft.CodeAnalysis.Workspaces (29)
CodeActions\CodeAction_Cleanup.cs (3)
36static (document, options, cancellationToken) => ImportAdder.AddImportsFromSymbolAnnotationAsync(document, Simplifier.AddImportsAnnotation, options.AddImportOptions, cancellationToken),
38static (document, options, cancellationToken) => Simplifier.ReduceAsync(document, Simplifier.Annotation, options.SimplifierOptions, cancellationToken),
Microsoft.CodeAnalysis.Workspaces.UnitTests (19)
Simplifier\SimplifierTests.cs (19)
38await Assert.ThrowsAsync<ArgumentNullException>("node", () => Simplifier.ExpandAsync<SyntaxNode>(node: null!, document: null!));
39await Assert.ThrowsAsync<ArgumentNullException>("document", () => Simplifier.ExpandAsync(node: node, document: null!));
40await Assert.ThrowsAsync<ArgumentNullException>("document", () => Simplifier.ExpandAsync(token: default, document: null!));
49Assert.Throws<ArgumentNullException>("node", () => Simplifier.Expand<SyntaxNode>(node: null!, semanticModel: null!, services: null!));
50Assert.Throws<ArgumentNullException>("semanticModel", () => Simplifier.Expand(node, semanticModel: null!, services: null!));
51Assert.Throws<ArgumentNullException>("services", () => Simplifier.Expand(node, semanticModel, services: null!));
52Assert.Throws<ArgumentNullException>("workspace", () => Simplifier.Expand(node, semanticModel, workspace: null!));
53Assert.Throws<ArgumentNullException>("workspace", () => Simplifier.Expand(token: default, semanticModel: null!, workspace: null!));
54Assert.Throws<ArgumentNullException>("workspace", () => Simplifier.Expand(token: default, semanticModel, workspace: null!));
63await Assert.ThrowsAsync<ArgumentNullException>("document", () => Simplifier.ReduceAsync(document: null!));
64await Assert.ThrowsAsync<ArgumentNullException>("document", () => Simplifier.ReduceAsync(document: null!, annotation: null!));
65await Assert.ThrowsAsync<ArgumentNullException>("annotation", () => Simplifier.ReduceAsync(document, annotation: null!));
66await Assert.ThrowsAsync<ArgumentNullException>("document", () => Simplifier.ReduceAsync(document: null!, span: default));
67await Assert.ThrowsAsync<ArgumentNullException>("document", () => Simplifier.ReduceAsync(document: null!, spans: null!));
68await Assert.ThrowsAsync<ArgumentNullException>("spans", () => Simplifier.ReduceAsync(document, spans: null!));
85ValidateCSharpOptions((CSharpSimplifierOptions)await Simplifier.GetOptionsAsync(csDocument, updatedOptions, CancellationToken.None));
86ValidateVisualBasicOptions((VisualBasicSimplifierOptions)await Simplifier.GetOptionsAsync(vbDocument, updatedOptions, CancellationToken.None));
94ValidateCSharpOptions((CSharpSimplifierOptions)await Simplifier.GetOptionsAsync(csDocumentWithUpdatedOptions, optionSet: null, CancellationToken.None));
95ValidateVisualBasicOptions((VisualBasicSimplifierOptions)await Simplifier.GetOptionsAsync(vbDocumentWithUpdatedOptions, optionSet: null, CancellationToken.None));
Microsoft.Interop.ComInterfaceGenerator (2)
Microsoft.VisualStudio.LanguageServices (2)
System.Windows.Forms.Analyzers.CodeFixes.VisualBasic (1)