299 references to Annotation
IdeCoreBenchmarks (2)
FormatterBenchmarks.cs (2)
54var root = document.GetSyntaxRootAsync(CancellationToken.None).Result.WithAdditionalAnnotations(Formatter.Annotation); 69var formattedDoc = Formatter.FormatAsync(_document, Formatter.Annotation, _options, CancellationToken.None).Result;
Microsoft.CodeAnalysis.CodeStyle.Fixes (23)
AbstractAddDocCommentNodesCodeFixProvider.cs (1)
121var newRoot = root.ReplaceNode(docCommentNode, newDocComment.WithAdditionalAnnotations(Formatter.Annotation));
AbstractMakeFieldReadonlyCodeFixProvider.cs (1)
93.WithAdditionalAnnotations(Formatter.Annotation);
AbstractMakeMethodSynchronousCodeFixProvider.cs (1)
104.WithAdditionalAnnotations(Formatter.Annotation, annotation);
AbstractMoveDeclarationNearReferenceService.cs (4)
128declarationStatement = declarationStatement.WithAdditionalAnnotations(Formatter.Annotation); 142newNextStatement.WithAdditionalAnnotations(Formatter.Annotation).WithLeadingTrivia( 152(current, generator) => current.WithAdditionalAnnotations(Formatter.Annotation).WithPrependedLeadingTrivia( 172declarationStatement.WithAdditionalAnnotations(Formatter.Annotation));
AbstractPopulateSwitchCodeFixProvider.cs (1)
199.WithAdditionalAnnotations(Formatter.Annotation);
AbstractPopulateSwitchExpressionCodeFixProvider.cs (1)
38switchNode, switchExpression).WithAdditionalAnnotations(Formatter.Annotation);
AbstractPopulateSwitchStatementCodeFixProvider.cs (1)
39switchNode, switchOperation).WithAdditionalAnnotations(Formatter.Annotation);
AbstractRemoveUnusedValuesCodeFixProvider.cs (3)
407.WithAdditionalAnnotations(Simplifier.Annotation, Formatter.Annotation); 422.WithAdditionalAnnotations(Simplifier.Annotation, Formatter.Annotation); 657editor.ReplaceNode(node, replacement.WithAdditionalAnnotations(Formatter.Annotation));
AbstractUseCollectionInitializerCodeFixProvider.cs (1)
97.WithAdditionalAnnotations(Formatter.Annotation);
AbstractUseNullPropagationCodeFixProvider.cs (1)
190.WithAdditionalAnnotations(Formatter.Annotation);
AbstractUseObjectInitializerCodeFixProvider.cs (1)
98.WithAdditionalAnnotations(Formatter.Annotation);
AddParameterEditor.cs (4)
46.WithAdditionalAnnotations(Formatter.Annotation); 73.WithAdditionalAnnotations(Formatter.Annotation)); 96.WithAdditionalAnnotations(Formatter.Annotation)); 117.WithAdditionalAnnotations(Formatter.Annotation));
AddParameterService.cs (1)
125.WithAdditionalAnnotations(Formatter.Annotation);
CodeGenerationHelpers.cs (1)
47=> node.WithAdditionalAnnotations(Formatter.Annotation, CodeGenerator.Annotation);
UseCoalesceExpressionForTernaryConditionalCheckCodeFixProvider.cs (1)
92return coalesceExpression.WithAdditionalAnnotations(Formatter.Annotation);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (39)
AssignOutParametersAboveReturnCodeFixProvider.cs (2)
67(c, _) => c.WithAdditionalAnnotations(Formatter.Annotation)); 87.WithAdditionalAnnotations(Formatter.Annotation));
ConvertNamespaceTransform.cs (1)
258semicolonToken: default).WithAdditionalAnnotations(Formatter.Annotation);
ConvertSwitchStatementToExpressionCodeFixProvider.cs (1)
107editor.ReplaceNode(switchStatement, switchExpressionStatement.WithAdditionalAnnotations(Formatter.Annotation));
ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (1)
269node.Expression.Cast(expressionConvertedType).WithAdditionalAnnotations(Formatter.Annotation),
ConvertToRecordEngine.cs (1)
417.WithAdditionalAnnotations(Formatter.Annotation);
CSharpAddYieldCodeFixProvider.cs (1)
81.WithAdditionalAnnotations(Formatter.Annotation);
CSharpCodeGenerationHelpers.cs (1)
29? result.WithAdditionalAnnotations(Formatter.Annotation)
CSharpInlineDeclarationCodeFixProvider.cs (2)
217(t, g) => t.WithTrailingTrivia(SyntaxFactory.ElasticSpace).WithoutAnnotations(Formatter.Annotation)); 304newType = newType.WithoutTrivia().WithAdditionalAnnotations(Formatter.Annotation);
CSharpIsAndCastCheckCodeFixProvider.cs (1)
103return newIf.WithAdditionalAnnotations(Formatter.Annotation);
CSharpMakeMethodAsynchronousCodeFixProvider.cs (1)
118var newReturnType = returnTypeSyntax.WithAdditionalAnnotations(Formatter.Annotation);
CSharpRemoveAsyncModifierCodeFixProvider.cs (1)
67? node.WithAdditionalAnnotations(Formatter.Annotation)
CSharpRemoveUnnecessaryCastCodeFixProvider.cs (1)
80return castExpression.Uncast().WithAdditionalAnnotations(Formatter.Annotation)
CSharpRemoveUnnecessaryDiscardDesignationCodeFixProvider.cs (3)
66.WithAdditionalAnnotations(Formatter.Annotation); 75.WithAdditionalAnnotations(Formatter.Annotation)); 84.WithAdditionalAnnotations(Formatter.Annotation));
CSharpReplaceDiscardDeclarationsWithAssignmentsService.cs (2)
229.WithAdditionalAnnotations(Formatter.Annotation); 250.WithAdditionalAnnotations(Formatter.Annotation));
CSharpSimplificationHelpers.cs (1)
85tokenWithLeadingWhitespace = token.WithLeadingTrivia(SyntaxFactory.ElasticMarker).WithAdditionalAnnotations(Formatter.Annotation);
CSharpSimplifyPropertyPatternCodeFixProvider.cs (1)
91.WithAdditionalAnnotations(Formatter.Annotation);
CSharpSyntaxFactsService.cs (2)
99.WithAdditionalAnnotations(Formatter.Annotation); 109braces.closeBrace.WithAdditionalAnnotations(Formatter.Annotation));
CSharpUseCompoundCoalesceAssignmentCodeFixProvider.cs (1)
79.WithAdditionalAnnotations(Formatter.Annotation);
CSharpUseConditionalExpressionForAssignmentCodeFixProvider.cs (1)
56.WithAdditionalAnnotations(Formatter.Annotation);
CSharpUseConditionalExpressionForReturnCodeFixProvider.cs (1)
42.WithAdditionalAnnotations(Formatter.Annotation);
CSharpUseLocalFunctionCodeFixProvider.cs (1)
167.WithAdditionalAnnotations(Formatter.Annotation);
CSharpUsePatternCombinatorsCodeFixProvider.cs (1)
91var patternSyntax = AsPatternSyntax(pattern).WithAdditionalAnnotations(Formatter.Annotation);
CSharpUseRangeOperatorCodeFixProvider.cs (1)
92var argument = Argument(rangeExpression).WithAdditionalAnnotations(Formatter.Annotation);
InvokeDelegateWithConditionalAccessCodeFixProvider.cs (2)
111newStatement = newStatement.WithAdditionalAnnotations(Formatter.Annotation); 151newStatement = newStatement.WithAdditionalAnnotations(Formatter.Annotation);
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\SyntaxNodeExtensions.cs\SyntaxNodeExtensions.cs (1)
30.WithAdditionalAnnotations(Formatter.Annotation);
MisplacedUsingDirectivesCodeFixProvider.cs (2)
198.Select(d => d.WithAdditionalAnnotations(Formatter.Annotation, s_warningAnnotation)); 230.Select(directive => directive.WithAdditionalAnnotations(Formatter.Annotation, s_warningAnnotation));
TypeDeclarationSyntaxExtensions.cs (1)
104return SyntaxFactory.Token(leadingTrivia, kind, trailingTrivia).WithAdditionalAnnotations(Formatter.Annotation);
UseExpressionBodyCodeFixProvider.cs (2)
73editor.ReplaceNode(accessorList, (current, _) => current.WithAdditionalAnnotations(Formatter.Annotation)); 88.WithAdditionalAnnotations(Formatter.Annotation);
UseExpressionBodyForLambdaCodeActionHelpers.cs (1)
19=> UpdateWorker(semanticModel, originalDeclaration, currentDeclaration).WithAdditionalAnnotations(Formatter.Annotation);
UseSimpleUsingStatementCodeFixProvider.cs (1)
103result[i] = result[i].WithAdditionalAnnotations(Formatter.Annotation);
Microsoft.CodeAnalysis.CSharp.EditorFeatures (2)
EventHookup\EventHookupCommandHandler_TabKeyCommand.cs (2)
177var formattedDocument = Formatter.FormatAsync(simplifiedDocument, Formatter.Annotation, cleanupOptions.FormattingOptions, cancellationToken).WaitAndGetResult(cancellationToken); 220.WithAdditionalAnnotations(Formatter.Annotation);
Microsoft.CodeAnalysis.CSharp.Features (77)
AddImport\CSharpAddImportFeatureService.cs (2)
432.WithAdditionalAnnotations(Formatter.Annotation), 485.WithAdditionalAnnotations(Formatter.Annotation);
AssignOutParametersAboveReturnCodeFixProvider.cs (2)
67(c, _) => c.WithAdditionalAnnotations(Formatter.Annotation)); 87.WithAdditionalAnnotations(Formatter.Annotation));
CodeFixes\Suppression\CSharpSuppressionCodeFixProvider.cs (1)
63var titleComment = SyntaxFactory.Comment(string.Format(" // {0}", title)).WithAdditionalAnnotations(Formatter.Annotation);
CodeRefactorings\InlineTemporary\InlineTemporaryCodeRefactoringProvider.cs (3)
312newLocalDeclaration.WithAdditionalAnnotations(Formatter.Annotation)); 344.WithAdditionalAnnotations(Formatter.Annotation); 381expressionToInline = expressionToInline.WithAdditionalAnnotations(Formatter.Annotation);
CodeRefactorings\UseRecursivePatterns\UseRecursivePatternsCodeRefactoringProvider.cs (2)
140return replacement.ConvertToSingleLine().WithAdditionalAnnotations(Formatter.Annotation); 191return rewrittenPattern.ConvertToSingleLine().WithAdditionalAnnotations(Formatter.Annotation, Simplifier.Annotation);
ConvertAutoPropertyToFullProperty\CSharpConvertAutoPropertyToFullPropertyCodeRefactoringProvider.cs (1)
101.WithAdditionalAnnotations(Formatter.Annotation);
ConvertLinq\ConvertForEachToLinqQuery\AbstractConverter.cs (2)
67.WithAdditionalAnnotations(Formatter.Annotation); 141.WithAdditionalAnnotations(Formatter.Annotation);
ConvertLinq\ConvertForEachToLinqQuery\AbstractToMethodConverter.cs (2)
105CreateDefaultStatement(queryOrLinqInvocationExpression, _modifyingExpression).WithAdditionalAnnotations(Formatter.Annotation)); 193SyntaxFactory.IdentifierName(MethodName))).WithAdditionalAnnotations(Formatter.Annotation);
ConvertLinq\ConvertForEachToLinqQuery\DefaultConverter.cs (1)
44.WithAdditionalAnnotations(Formatter.Annotation));
ConvertLinq\ConvertForEachToLinqQuery\YieldReturnConverter.cs (1)
45SyntaxFactory.ReturnStatement(queryOrLinqInvocationExpression).WithAdditionalAnnotations(Formatter.Annotation));
ConvertLinq\CSharpConvertLinqQueryToForEachProvider.cs (2)
709forEachStatement.Statement).WithAdditionalAnnotations(Formatter.Annotation), queryExpressionProcessingInfo); 731expression => forEachStatement.Statement.WithAdditionalAnnotations(Formatter.Annotation),
ConvertNamespaceTransform.cs (1)
258semicolonToken: default).WithAdditionalAnnotations(Formatter.Annotation);
ConvertProgram\ConvertProgramTransform_ProgramMain.cs (1)
134var statement = globalStatement.Statement.WithAdditionalAnnotations(Formatter.Annotation);
ConvertProgram\ConvertProgramTransform_TopLevelStatements.cs (1)
232globalStatements.Add(GlobalStatement(statement).WithAdditionalAnnotations(Formatter.Annotation));
ConvertSwitchStatementToExpressionCodeFixProvider.cs (1)
107editor.ReplaceNode(switchStatement, switchExpressionStatement.WithAdditionalAnnotations(Formatter.Annotation));
ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (1)
269node.Expression.Cast(expressionConvertedType).WithAdditionalAnnotations(Formatter.Annotation),
ConvertToRecordEngine.cs (1)
417.WithAdditionalAnnotations(Formatter.Annotation);
CSharpAddYieldCodeFixProvider.cs (1)
81.WithAdditionalAnnotations(Formatter.Annotation);
CSharpInlineDeclarationCodeFixProvider.cs (2)
217(t, g) => t.WithTrailingTrivia(SyntaxFactory.ElasticSpace).WithoutAnnotations(Formatter.Annotation)); 304newType = newType.WithoutTrivia().WithAdditionalAnnotations(Formatter.Annotation);
CSharpIsAndCastCheckCodeFixProvider.cs (1)
103return newIf.WithAdditionalAnnotations(Formatter.Annotation);
CSharpMakeMethodAsynchronousCodeFixProvider.cs (1)
118var newReturnType = returnTypeSyntax.WithAdditionalAnnotations(Formatter.Annotation);
CSharpRemoveAsyncModifierCodeFixProvider.cs (1)
67? node.WithAdditionalAnnotations(Formatter.Annotation)
CSharpRemoveUnnecessaryCastCodeFixProvider.cs (1)
80return castExpression.Uncast().WithAdditionalAnnotations(Formatter.Annotation)
CSharpRemoveUnnecessaryDiscardDesignationCodeFixProvider.cs (3)
66.WithAdditionalAnnotations(Formatter.Annotation); 75.WithAdditionalAnnotations(Formatter.Annotation)); 84.WithAdditionalAnnotations(Formatter.Annotation));
CSharpSimplifyPropertyPatternCodeFixProvider.cs (1)
91.WithAdditionalAnnotations(Formatter.Annotation);
CSharpUseCompoundCoalesceAssignmentCodeFixProvider.cs (1)
79.WithAdditionalAnnotations(Formatter.Annotation);
CSharpUseConditionalExpressionForAssignmentCodeFixProvider.cs (1)
56.WithAdditionalAnnotations(Formatter.Annotation);
CSharpUseConditionalExpressionForReturnCodeFixProvider.cs (1)
42.WithAdditionalAnnotations(Formatter.Annotation);
CSharpUseLocalFunctionCodeFixProvider.cs (1)
167.WithAdditionalAnnotations(Formatter.Annotation);
CSharpUsePatternCombinatorsCodeFixProvider.cs (1)
91var patternSyntax = AsPatternSyntax(pattern).WithAdditionalAnnotations(Formatter.Annotation);
CSharpUseRangeOperatorCodeFixProvider.cs (1)
92var argument = Argument(rangeExpression).WithAdditionalAnnotations(Formatter.Annotation);
EncapsulateField\CSharpEncapsulateFieldService.cs (1)
81.WithAdditionalAnnotations(Formatter.Annotation)
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (2)
122Formatter.Annotation.AddAnnotationToSymbol(methodSymbol))); 146return container.CopyAnnotationsTo(callSiteGenerator.Generate()).WithAdditionalAnnotations(Formatter.Annotation);
FullyQualify\CSharpFullyQualifyService.cs (1)
49.WithAdditionalAnnotations(Formatter.Annotation);
GenerateMember\GenerateVariable\CSharpGenerateVariableService.cs (1)
211declarationStatement = declarationStatement.WithAdditionalAnnotations(Formatter.Annotation);
GenerateType\CSharpGenerateTypeService.cs (1)
804var addedCompilationRoot = compilationRoot.AddUsingDirectives(new[] { usingDirective }, addImportOptions.PlaceSystemNamespaceFirst, Formatter.Annotation);
InitializeParameter\CSharpInitializeMemberFromParameterCodeRefactoringProvider.cs (1)
84.WithAdditionalAnnotations(Formatter.Annotation);
InitializeParameter\InitializeParameterHelpers.cs (1)
111(currentBlock, _) => currentBlock.WithAdditionalAnnotations(Formatter.Annotation));
IntroduceVariable\CSharpIntroduceVariableService_IntroduceField.cs (1)
51SyntaxFactory.EqualsValueClause(expression.WithoutTrivia()))))).WithAdditionalAnnotations(Formatter.Annotation);
IntroduceVariable\CSharpIntroduceVariableService_IntroduceLocal.cs (4)
110.WithAdditionalAnnotations(Formatter.Annotation); 242.WithAdditionalAnnotations(Formatter.Annotation); 292declarationStatement = declarationStatement.WithAdditionalAnnotations(Formatter.Annotation); 329SyntaxFactory.Block(root.GetCurrentNode(statement)).WithAdditionalAnnotations(Formatter.Annotation));
IntroduceVariable\CSharpIntroduceVariableService_IntroduceQueryLocal.cs (1)
38expression).WithAdditionalAnnotations(Formatter.Annotation);
InvertIf\CSharpInvertIfCodeRefactoringProvider.cs (1)
178: updatedIf.WithAdditionalAnnotations(Formatter.Annotation);
InvokeDelegateWithConditionalAccessCodeFixProvider.cs (2)
111newStatement = newStatement.WithAdditionalAnnotations(Formatter.Annotation); 151newStatement = newStatement.WithAdditionalAnnotations(Formatter.Annotation);
MisplacedUsingDirectivesCodeFixProvider.cs (2)
198.Select(d => d.WithAdditionalAnnotations(Formatter.Annotation, s_warningAnnotation)); 230.Select(directive => directive.WithAdditionalAnnotations(Formatter.Annotation, s_warningAnnotation));
ReplaceMethodWithProperty\CSharpReplaceMethodWithPropertyService.cs (5)
152return property.WithAdditionalAnnotations(Formatter.Annotation); 185.WithAdditionalAnnotations(Formatter.Annotation); 198.WithAdditionalAnnotations(Formatter.Annotation); 224return accessor.WithBody(getMethodDeclaration.Body.WithAdditionalAnnotations(Formatter.Annotation)); 273return accessor.WithBody(body.WithAdditionalAnnotations(Formatter.Annotation));
ReplacePropertyWithMethods\CSharpReplacePropertyWithMethodsService.cs (4)
140.WithAdditionalAnnotations(Formatter.Annotation); 211.WithAdditionalAnnotations(Formatter.Annotation); 269.WithAdditionalAnnotations(Formatter.Annotation); 280.WithAdditionalAnnotations(Formatter.Annotation);
ReverseForStatement\CSharpReverseForStatementCodeRefactoringProvider.cs (1)
354return expr.WithAdditionalAnnotations(Formatter.Annotation);
SimplifyTypeNames\SimplifyTypeNamesCodeFixProvider.cs (1)
55Simplifier.Annotation, Formatter.Annotation, DoNotAllowVarAnnotation.Annotation);
UseExpressionBody\UseExpressionBodyCodeRefactoringProvider.cs (1)
186.WithAdditionalAnnotations(Formatter.Annotation);
UseExpressionBodyCodeFixProvider.cs (2)
73editor.ReplaceNode(accessorList, (current, _) => current.WithAdditionalAnnotations(Formatter.Annotation)); 88.WithAdditionalAnnotations(Formatter.Annotation);
UseExpressionBodyForLambdaCodeActionHelpers.cs (1)
19=> UpdateWorker(semanticModel, originalDeclaration, currentDeclaration).WithAdditionalAnnotations(Formatter.Annotation);
UseSimpleUsingStatementCodeFixProvider.cs (1)
103result[i] = result[i].WithAdditionalAnnotations(Formatter.Annotation);
Microsoft.CodeAnalysis.CSharp.Workspaces (12)
CSharpCodeGenerationHelpers.cs (1)
29? result.WithAdditionalAnnotations(Formatter.Annotation)
CSharpReplaceDiscardDeclarationsWithAssignmentsService.cs (2)
229.WithAdditionalAnnotations(Formatter.Annotation); 250.WithAdditionalAnnotations(Formatter.Annotation));
CSharpSimplificationHelpers.cs (1)
85tokenWithLeadingWhitespace = token.WithLeadingTrivia(SyntaxFactory.ElasticMarker).WithAdditionalAnnotations(Formatter.Annotation);
CSharpSyntaxFactsService.cs (2)
99.WithAdditionalAnnotations(Formatter.Annotation); 109braces.closeBrace.WithAdditionalAnnotations(Formatter.Annotation));
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\SyntaxNodeExtensions.cs\SyntaxNodeExtensions.cs (1)
30.WithAdditionalAnnotations(Formatter.Annotation);
Simplification\CSharpSimplificationService.cs (1)
167tokenWithLeadingWhitespace = token.WithLeadingTrivia(SyntaxFactory.ElasticMarker).WithAdditionalAnnotations(Formatter.Annotation);
Simplification\CSharpSimplificationService.Expander.cs (1)
1125.WithAdditionalAnnotations(Simplifier.Annotation, Formatter.Annotation);
Simplification\Reducers\CSharpNameReducer.cs (1)
63node = node.CopyAnnotationsTo(replacementNode).WithAdditionalAnnotations(Formatter.Annotation);
Simplification\Reducers\CSharpNameReducer.Rewriter.cs (1)
223return result.Parenthesize().WithAdditionalAnnotations(Formatter.Annotation);
TypeDeclarationSyntaxExtensions.cs (1)
104return SyntaxFactory.Token(leadingTrivia, kind, trailingTrivia).WithAdditionalAnnotations(Formatter.Annotation);
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (3)
CodeGeneration\SymbolEditorTests.cs (1)
57document = await Formatter.FormatAsync(document, Formatter.Annotation, CSharpSyntaxFormattingOptions.Default, CancellationToken.None);
Formatting\FormattingElasticTriviaTests.cs (2)
117var newDecl = generator.AddAttributes(decl, generator.Attribute("Some")).WithAdditionalAnnotations(Formatter.Annotation); 140var annotationFormatted = Formatter.Format(newRoot, Formatter.Annotation, workspace.Services.SolutionServices, options, CancellationToken.None).ToFullString();
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (4)
CodeGeneration\CodeGenerationTests.cs (4)
555.WithAdditionalAnnotations(Formatter.Annotation); 574.WithAdditionalAnnotations(Formatter.Annotation); 626updatedDeclarationNode = updatedDeclarationNode.WithAdditionalAnnotations(Formatter.Annotation); 974var actual = Formatter.FormatAsync(simplified, Formatter.Annotation, formattingOptions, CancellationToken.None).Result.GetSyntaxRootAsync().Result.ToFullString();
Microsoft.CodeAnalysis.Features (60)
AbstractAddDocCommentNodesCodeFixProvider.cs (1)
121var newRoot = root.ReplaceNode(docCommentNode, newDocComment.WithAdditionalAnnotations(Formatter.Annotation));
AbstractMakeFieldReadonlyCodeFixProvider.cs (1)
93.WithAdditionalAnnotations(Formatter.Annotation);
AbstractMakeMethodSynchronousCodeFixProvider.cs (1)
104.WithAdditionalAnnotations(Formatter.Annotation, annotation);
AbstractPopulateSwitchCodeFixProvider.cs (1)
199.WithAdditionalAnnotations(Formatter.Annotation);
AbstractPopulateSwitchExpressionCodeFixProvider.cs (1)
38switchNode, switchExpression).WithAdditionalAnnotations(Formatter.Annotation);
AbstractPopulateSwitchStatementCodeFixProvider.cs (1)
39switchNode, switchOperation).WithAdditionalAnnotations(Formatter.Annotation);
AbstractRemoveUnusedValuesCodeFixProvider.cs (3)
407.WithAdditionalAnnotations(Simplifier.Annotation, Formatter.Annotation); 422.WithAdditionalAnnotations(Simplifier.Annotation, Formatter.Annotation); 657editor.ReplaceNode(node, replacement.WithAdditionalAnnotations(Formatter.Annotation));
AbstractUseCollectionInitializerCodeFixProvider.cs (1)
97.WithAdditionalAnnotations(Formatter.Annotation);
AbstractUseNullPropagationCodeFixProvider.cs (1)
190.WithAdditionalAnnotations(Formatter.Annotation);
AbstractUseObjectInitializerCodeFixProvider.cs (1)
98.WithAdditionalAnnotations(Formatter.Annotation);
AddConstructorParametersFromMembers\AddConstructorParametersFromMembersCodeRefactoringProvider.AddConstructorParametersCodeAction.cs (1)
65.WithAdditionalAnnotations(Formatter.Annotation);
AddParameterService.cs (1)
125.WithAdditionalAnnotations(Formatter.Annotation);
ChangeSignature\AbstractChangeSignatureService.cs (2)
519newArguments.Add(argument.WithName(param.Name).WithAdditionalAnnotations(Formatter.Annotation)); 542newArguments.Add(paramsArrayArgument.WithName(param.Name).WithAdditionalAnnotations(Formatter.Annotation));
CodeRefactorings\SyncNamespace\AbstractChangeNamespaceService.cs (4)
416import = import.WithAdditionalAnnotations(Formatter.Annotation); 628.WithAdditionalAnnotations(Formatter.Annotation); 632root = Formatter.Format(root, Formatter.Annotation, services, documentOptions.FormattingOptions, cancellationToken); 670var formattedDocument = await Formatter.FormatAsync(documentWithAdditionalImports, Formatter.Annotation, documentOptions.FormattingOptions, cancellationToken)
Completion\Providers\AbstractMemberInsertingCompletionProvider.cs (2)
201memberContainingDocument = await Formatter.FormatAsync(memberContainingDocument, Formatter.Annotation, cleanupOptions.FormattingOptions, cancellationToken).ConfigureAwait(false); 222dismemberedDocument = await Formatter.FormatAsync(dismemberedDocument, Formatter.Annotation, cleanupOptions.FormattingOptions, cancellationToken).ConfigureAwait(false);
Completion\Providers\ImportCompletionProvider\AbstractImportCompletionProvider.cs (2)
145var formattedDocumentWithImport = await Formatter.FormatAsync(documentWithImport, Formatter.Annotation, formattingOptions, cancellationToken).ConfigureAwait(false); 239return syntaxGenerator.NamespaceImportDeclaration(namespaceName).WithAdditionalAnnotations(Formatter.Annotation);
ConvertAnonymousType\AbstractConvertAnonymousTypeToClassCodeRefactoringProvider.cs (1)
240.WithAdditionalAnnotations(Formatter.Annotation);
ConvertAnonymousType\AbstractConvertAnonymousTypeToTupleCodeRefactoringProvider.cs (1)
130return ConvertToTuple(anonCreation).WithAdditionalAnnotations(Formatter.Annotation);
ConvertAutoPropertyToFullProperty\AbstractConvertAutoPropertyToFullPropertyCodeRefactoringProvider.cs (1)
101editor.ReplaceNode(property, fullProperty.WithAdditionalAnnotations(Formatter.Annotation));
ConvertForEachToFor\AbstractConvertForEachToForCodeRefactoringProvider.cs (2)
100return foreachCollectionExpression.WithoutTrivia().WithAdditionalAnnotations(Formatter.Annotation); 146return (TStatementSyntax)localDecl.WithAdditionalAnnotations(Formatter.Annotation);
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.Rewriting.cs (1)
50.WithAdditionalAnnotations(Formatter.Annotation)
ConvertToInterpolatedString\AbstractConvertPlaceholderToInterpolatedStringRefactoringProvider.cs (1)
317syntaxFacts.ConvertToSingleLine(expressions[index], useElasticTrivia: true).WithAdditionalAnnotations(Formatter.Annotation));
ConvertTupleToStruct\AbstractConvertTupleToStructCodeRefactoringProvider.cs (1)
705.WithAdditionalAnnotations(Formatter.Annotation);
EncapsulateField\AbstractEncapsulateFieldService.cs (4)
217document = await Formatter.FormatAsync(document.WithSyntaxRoot(rewrittenFieldDeclaration), Formatter.Annotation, formattingOptions, cancellationToken).ConfigureAwait(false); 225var updatedLinkedDocument = await Formatter.FormatAsync(linkedDocument.WithSyntaxRoot(updatedLinkedRoot), Formatter.Annotation, linkedDocumentFormattingOptions, cancellationToken).ConfigureAwait(false); 251documentWithProperty = await Formatter.FormatAsync(documentWithProperty, Formatter.Annotation, formattingOptions, cancellationToken).ConfigureAwait(false); 390Formatter.Annotation.AddAnnotationToSymbol(propertySymbol));
ExtractInterface\AbstractExtractInterfaceService.cs (2)
307Formatter.Annotation, 358var unformattedTypeDeclaration = syntaxGenerator.AddInterfaceType(typeDeclaration, typeReference).WithAdditionalAnnotations(Formatter.Annotation);
ExtractMethod\ExtractMethodResult.cs (1)
101Formatter.Format(simplifiedRoot, Formatter.Annotation, services, cleanupOptions.FormattingOptions, FormattingRules, cancellationToken));
GenerateMember\GenerateVariable\AbstractGenerateVariableService.GenerateLocalCodeAction.cs (1)
72localStatement = localStatement.WithAdditionalAnnotations(Formatter.Annotation);
IntroduceParameter\IntroduceParameterDocumentRewriter.cs (1)
528updatedExpression.WithAdditionalAnnotations(Formatter.Annotation), parameterName, insertionIndex, named);
IntroduceUsingStatement\AbstractIntroduceUsingStatementCodeRefactoringProvider.cs (3)
145newParent.WithAdditionalAnnotations(Formatter.Annotation))); 174newParent.WithAdditionalAnnotations(Formatter.Annotation))); 183usingStatement.WithAdditionalAnnotations(Formatter.Annotation)));
IntroduceVariable\AbstractIntroduceVariableService.cs (1)
393.WithAdditionalAnnotations(Formatter.Annotation);
IntroduceVariable\AbstractIntroduceVariableService.IntroduceVariableAllOccurrenceCodeAction.cs (1)
36document = await Formatter.FormatAsync(document, Formatter.Annotation, Options.FormattingOptions, cancellationToken).ConfigureAwait(false);
InvertIf\AbstractInvertIfCodeRefactoringProvider.cs (5)
511return root.ReplaceNode(currentParent, updatedParent.WithAdditionalAnnotations(Formatter.Annotation)); 536return root.ReplaceNode(currentParent, updatedParent.WithAdditionalAnnotations(Formatter.Annotation)); 563return root.ReplaceNode(currentParent, updatedParent.WithAdditionalAnnotations(Formatter.Annotation)); 586return root.ReplaceNode(currentParent, updatedParent.WithAdditionalAnnotations(Formatter.Annotation)); 611return root.ReplaceNode(currentParent, updatedParent.WithAdditionalAnnotations(Formatter.Annotation));
RemoveUnusedVariable\AbstractRemoveUnusedVariableCodeFixProvider.cs (1)
80token.Parent.ReplaceToken(token, default(SyntaxToken)).WithAdditionalAnnotations(Formatter.Annotation)));
Snippets\SnippetProviders\AbstractConsoleSnippetProvider.cs (1)
111var reformatSnippetNode = snippetExpressionNode.WithAdditionalAnnotations(findSnippetAnnotation, cursorAnnotation, Simplifier.Annotation, SymbolAnnotation.Create(consoleSymbol!), Formatter.Annotation);
Snippets\SnippetProviders\AbstractSnippetProvider.cs (1)
236var reformatSnippetNode = snippetExpressionNode.WithAdditionalAnnotations(findSnippetAnnotation, cursorAnnotation, Simplifier.Annotation, Formatter.Annotation);
SplitOrMergeIfStatements\Consecutive\AbstractMergeConsecutiveIfStatementsCodeRefactoringProvider.cs (1)
91newCondition = newCondition.WithAdditionalAnnotations(Formatter.Annotation);
SplitOrMergeIfStatements\Consecutive\AbstractSplitIntoConsecutiveIfStatementsCodeRefactoringProvider.cs (2)
67leftCondition = leftCondition.WithAdditionalAnnotations(Formatter.Annotation); 68rightCondition = rightCondition.WithAdditionalAnnotations(Formatter.Annotation);
SplitOrMergeIfStatements\Nested\AbstractMergeNestedIfStatementsCodeRefactoringProvider.cs (1)
85return root.ReplaceNode(outerIfOrElseIf, newIfOrElseIf.WithAdditionalAnnotations(Formatter.Annotation));
SplitOrMergeIfStatements\Nested\AbstractSplitIntoNestedIfStatementsCodeRefactoringProvider.cs (1)
57root.ReplaceNode(ifOrElseIf, outerIfOrElseIf.WithAdditionalAnnotations(Formatter.Annotation)));
UseCoalesceExpressionForTernaryConditionalCheckCodeFixProvider.cs (1)
92return coalesceExpression.WithAdditionalAnnotations(Formatter.Annotation);
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (10)
TypeBlockSyntaxExtensions.vb (3)
94Return SyntaxFactory.EndClassStatement().WithAdditionalAnnotations(Formatter.Annotation) 96Return SyntaxFactory.EndInterfaceStatement().WithAdditionalAnnotations(Formatter.Annotation) 98Return SyntaxFactory.EndStructureStatement().WithAdditionalAnnotations(Formatter.Annotation)
VisualBasicChangeToYieldCodeFixProvider.vb (1)
42Dim yieldStatement = SyntaxFactory.YieldStatement(returnStatement.Expression).WithAdditionalAnnotations(Formatter.Annotation)
VisualBasicConvertToAsyncFunctionCodeFixProvider.vb (2)
100.WithAdditionalAnnotations(Formatter.Annotation) 105.WithAdditionalAnnotations(Formatter.Annotation)
VisualBasicConvertToIteratorCodeFixProvider.vb (2)
113Dim iteratorToken As SyntaxToken = Token(SyntaxKind.IteratorKeyword).WithAdditionalAnnotations(Formatter.Annotation) 132Dim iteratorToken As SyntaxToken = Token(SyntaxKind.IteratorKeyword).WithAdditionalAnnotations(Formatter.Annotation)
VisualBasicRemoveUnnecessaryCastCodeFixProvider.vb (1)
108Dim newCastExpression = Uncast(castExpression).WithAdditionalAnnotations(Formatter.Annotation)
VisualBasicRemoveUnnecessaryImportsService.vb (1)
47newRoot = newRoot.WithAdditionalAnnotations(Formatter.Annotation)
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (2)
NavigationBar\VisualBasicEditorNavigationBarItemService_CodeGeneration.vb (1)
75Formatter.Annotation,
Utilities\CommandHandlers\AbstractImplementAbstractClassOrInterfaceCommandHandler.vb (1)
177newDocument = Formatter.FormatAsync(newDocument, Formatter.Annotation, cleanupOptions.FormattingOptions, cancellationToken).WaitAndGetResult(cancellationToken)
Microsoft.CodeAnalysis.VisualBasic.Features (35)
AddImport\VisualBasicAddImportFeatureService.vb (1)
303newRoot = newRoot.WithAdditionalAnnotations(CaseCorrector.Annotation, Formatter.Annotation)
CodeFixes\GenerateEndConstruct\GenerateEndConstructCodeFixProvider.vb (3)
195Dim updatedDocument = Await document.ReplaceNodeAsync(node, updatedProperty.WithAdditionalAnnotations(Formatter.Annotation), cancellationToken).ConfigureAwait(False) 222Dim updatedDocument = Await document.ReplaceNodeAsync(endStatement.Parent, updatedParent.WithAdditionalAnnotations(Formatter.Annotation), cancellationToken).ConfigureAwait(False) 257updatedDocument = Await updatedDocument.ReplaceNodeAsync(tree, tree.WithAdditionalAnnotations(Formatter.Annotation), cancellationToken).ConfigureAwait(False)
CodeFixes\IncorrectExitContinue\IncorrectExitContinueCodeFixProvider.vb (2)
206.WithAdditionalAnnotations(Formatter.Annotation) 225.WithAdditionalAnnotations(Formatter.Annotation)
CodeFixes\OverloadBase\OverloadBaseCodeFixProvider.AddKeywordAction.vb (1)
81Return newNode.WithAdditionalAnnotations(Formatter.Annotation)
CodeFixes\Suppression\VisualBasicSuppressionCodeFixProvider.vb (1)
67Dim titleComment = SyntaxFactory.CommentTrivia(String.Format(" ' {0}", title)).WithAdditionalAnnotations(Formatter.Annotation)
CodeRefactorings\InlineTemporary\VisualBasicInlineTemporaryCodeRefactoringProvider.ReferenceRewriter.vb (1)
61.WithAdditionalAnnotations(Formatter.Annotation, Simplifier.Annotation)
CodeRefactorings\InlineTemporary\VisualBasicInlineTemporaryCodeRefactoringProvider.vb (4)
196updatedDocument = Await updatedDocument.ReplaceNodeAsync(scope, newScope.WithAdditionalAnnotations(Formatter.Annotation), cancellationToken).ConfigureAwait(False) 282.WithAdditionalAnnotations(Formatter.Annotation) 313.WithAdditionalAnnotations(Formatter.Annotation) 325.WithAdditionalAnnotations(Formatter.Annotation)
EncapsulateField\VisualBasicEncapsulateFieldService.vb (2)
51root = root.ReplaceNode(fieldIdentifier, fieldIdentifier.WithIdentifier(newIdentifier).WithAdditionalAnnotations(annotation, Formatter.Annotation)) 63.WithAdditionalAnnotations(Formatter.Annotation)
ExtractInterface\VisualBasicExtractInterfaceService.vb (2)
75Return implementsClause.AddInterfaceMembers(qualifiedName).WithAdditionalAnnotations(Formatter.Annotation) 77Return SyntaxFactory.ImplementsClause(qualifiedName).WithAdditionalAnnotations(Formatter.Annotation)
ExtractMethod\VisualBasicMethodExtractor.VisualBasicCodeGenerator.vb (2)
87Formatter.Annotation.AddAnnotationToSymbol(methodSymbol))) 107Return container.CopyAnnotationsTo(callSiteGenerator.Generate()).WithAdditionalAnnotations(Formatter.Annotation)
FullyQualify\VisualBasicFullyQualifyService.vb (1)
67WithAdditionalAnnotations(Formatter.Annotation, CaseCorrector.Annotation)
GenerateType\VisualBasicGenerateTypeService.vb (1)
676Dim addedCompilationRoot = compilationRoot.AddImportsStatement(newImport, addImportOptions.PlaceSystemNamespaceFirst, Formatter.Annotation, Simplifier.Annotation)
IntroduceVariable\VisualBasicIntroduceVariableService_IntroduceField.vb (1)
215.WithAdditionalAnnotations(Formatter.Annotation)
IntroduceVariable\VisualBasicIntroduceVariableService_IntroduceLocal.vb (4)
93SyntaxFactory.EndFunctionStatement()).WithAdditionalAnnotations(Formatter.Annotation) 126declarationStatement = declarationStatement.WithAdditionalAnnotations(Formatter.Annotation, localAnnotation) 156Dim finalInnerMostBlock = oldInnerMostCommonBlock.ReplaceStatements(statements, Formatter.Annotation) 182Dim newRoot = tree.ConvertSingleLineToMultiLineExecutableBlock(oldBlock, statements, Formatter.Annotation)
IntroduceVariable\VisualBasicIntroduceVariableService_IntroduceQueryLocal.vb (1)
30expression)).WithAdditionalAnnotations(Formatter.Annotation)
ReplaceMethodWithProperty\VisualBasicReplaceMethodWithPropertyService.vb (1)
128Return newPropertyDeclaration.WithAdditionalAnnotations(Formatter.Annotation)
ReplacePropertyWithMethods\VisualBasicReplacePropertyWithMethods.vb (1)
110Return statement.WithAdditionalAnnotations(Formatter.Annotation)
VisualBasicChangeToYieldCodeFixProvider.vb (1)
42Dim yieldStatement = SyntaxFactory.YieldStatement(returnStatement.Expression).WithAdditionalAnnotations(Formatter.Annotation)
VisualBasicConvertToAsyncFunctionCodeFixProvider.vb (2)
100.WithAdditionalAnnotations(Formatter.Annotation) 105.WithAdditionalAnnotations(Formatter.Annotation)
VisualBasicConvertToIteratorCodeFixProvider.vb (2)
113Dim iteratorToken As SyntaxToken = Token(SyntaxKind.IteratorKeyword).WithAdditionalAnnotations(Formatter.Annotation) 132Dim iteratorToken As SyntaxToken = Token(SyntaxKind.IteratorKeyword).WithAdditionalAnnotations(Formatter.Annotation)
VisualBasicRemoveUnnecessaryCastCodeFixProvider.vb (1)
108Dim newCastExpression = Uncast(castExpression).WithAdditionalAnnotations(Formatter.Annotation)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (6)
Simplification\Reducers\VisualBasicNameReducer.vb (1)
48node = node.CopyAnnotationsTo(replacementNode).WithAdditionalAnnotations(Formatter.Annotation)
Simplification\Reducers\VisualBasicVariableDeclaratorReducer.vb (1)
45replacementNode = node.CopyAnnotationsTo(replacementNode).WithAdditionalAnnotations(Formatter.Annotation)
TypeBlockSyntaxExtensions.vb (3)
94Return SyntaxFactory.EndClassStatement().WithAdditionalAnnotations(Formatter.Annotation) 96Return SyntaxFactory.EndInterfaceStatement().WithAdditionalAnnotations(Formatter.Annotation) 98Return SyntaxFactory.EndStructureStatement().WithAdditionalAnnotations(Formatter.Annotation)
VisualBasicRemoveUnnecessaryImportsService.vb (1)
47newRoot = newRoot.WithAdditionalAnnotations(Formatter.Annotation)
Microsoft.CodeAnalysis.Workspaces (13)
AbstractMoveDeclarationNearReferenceService.cs (4)
128declarationStatement = declarationStatement.WithAdditionalAnnotations(Formatter.Annotation); 142newNextStatement.WithAdditionalAnnotations(Formatter.Annotation).WithLeadingTrivia( 152(current, generator) => current.WithAdditionalAnnotations(Formatter.Annotation).WithPrependedLeadingTrivia( 172declarationStatement.WithAdditionalAnnotations(Formatter.Annotation));
AddParameterEditor.cs (4)
46.WithAdditionalAnnotations(Formatter.Annotation); 73.WithAdditionalAnnotations(Formatter.Annotation)); 96.WithAdditionalAnnotations(Formatter.Annotation)); 117.WithAdditionalAnnotations(Formatter.Annotation));
CodeActions\CodeAction.cs (2)
345/// Formatting nodes annotated with <see cref="Formatter.Annotation"/> 374document = await Formatter.FormatAsync(document, Formatter.Annotation, options.FormattingOptions, cancellationToken).ConfigureAwait(false);
CodeGenerationHelpers.cs (1)
47=> node.WithAdditionalAnnotations(Formatter.Annotation, CodeGenerator.Annotation);
Editing\ImportAdderService.cs (1)
103.WithAdditionalAnnotations(Simplifier.Annotation, Formatter.Annotation);
Rename\ConflictEngine\RenamedSpansTracker.cs (1)
166document = await Formatter.FormatAsync(document, Formatter.Annotation, cleanupOptions.FormattingOptions, cancellationToken).ConfigureAwait(false);
Microsoft.VisualStudio.LanguageServices (1)
Venus\ContainedLanguageCodeSupport.cs (1)
235Formatter.Annotation,
Microsoft.VisualStudio.LanguageServices.CSharp (2)
Snippets\SnippetExpansionClient.cs (2)
128var formattedDocument = Formatter.FormatAsync(newDocument, Formatter.Annotation, formattingOptions, cancellationToken).WaitAndGetResult(cancellationToken); 169newUsings.Add(candidateUsing.WithAdditionalAnnotations(Formatter.Annotation).WithAppendedTrailingTrivia(SyntaxFactory.CarriageReturnLineFeed));
Microsoft.VisualStudio.LanguageServices.Implementation (1)
CodeModel\FileCodeModel.cs (1)
352var formatted = await Formatter.FormatAsync(result, Formatter.Annotation, formattingOptions, CancellationToken.None).ConfigureAwait(true);
Microsoft.VisualStudio.LanguageServices.VisualBasic (7)
CodeModel\VisualBasicCodeModelService.vb (5)
1331Dim newDeclarator = declarator.RemoveNode(node, SyntaxRemoveOptions.KeepEndOfLine).WithAdditionalAnnotations(Formatter.Annotation) 1344Dim newDeclaration = declaration.RemoveNode(node, SyntaxRemoveOptions.KeepEndOfLine).WithAdditionalAnnotations(Formatter.Annotation) 1372Dim newArgumentList = argumentList.RemoveNode(node, SyntaxRemoveOptions.KeepEndOfLine).WithAdditionalAnnotations(Formatter.Annotation) 1379Dim newParameterList = parameterList.RemoveNode(node, SyntaxRemoveOptions.KeepEndOfLine).WithAdditionalAnnotations(Formatter.Annotation) 3939.WithAdditionalAnnotations(Formatter.Annotation)
Snippets\SnippetExpansionClient.vb (2)
139Dim formattedDocument = Formatter.FormatAsync(newDocument, Formatter.Annotation, formattingOptions, cancellationToken).WaitAndGetResult(cancellationToken) 204importsToAdd.Add(filteredImportsStatement.WithAdditionalAnnotations(Formatter.Annotation) _