114 references to WithAdditionalAnnotations
Microsoft.CodeAnalysis.CodeStyle (2)
AnnotationTable.cs (1)
84=> token.WithAdditionalAnnotations(this.GetOrCreateRealAnnotations(annotations).ToArray());
SyntaxNodeExtensions.cs (1)
296return root.ReplaceTokens(tokenMap.Keys, (o, n) => o.WithAdditionalAnnotations(tokenMap[o]));
Microsoft.CodeAnalysis.CodeStyle.Fixes (3)
AbstractAddAnonymousTypeMemberNameCodeFixProvider.cs (1)
131nameToken = nameToken.WithAdditionalAnnotations(annotation);
IIndentationService.cs (1)
48var newToken = token.WithAdditionalAnnotations(annotation);
SimplificationHelpers.cs (1)
58to = to.WithAdditionalAnnotations(DontSimplifyAnnotation);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (6)
CSharpSimplificationHelpers.cs (2)
54.WithAdditionalAnnotations(Simplifier.Annotation); 85tokenWithLeadingWhitespace = token.WithLeadingTrivia(SyntaxFactory.ElasticMarker).WithAdditionalAnnotations(Formatter.Annotation);
CSharpSyntaxFactsService.cs (2)
99.WithAdditionalAnnotations(Formatter.Annotation); 109braces.closeBrace.WithAdditionalAnnotations(Formatter.Annotation));
StringExtensions.cs (1)
51token = token.WithAdditionalAnnotations(Simplifier.Annotation);
TypeDeclarationSyntaxExtensions.cs (1)
104return SyntaxFactory.Token(leadingTrivia, kind, trailingTrivia).WithAdditionalAnnotations(Formatter.Annotation);
Microsoft.CodeAnalysis.CSharp.EditorFeatures (2)
AutomaticCompletion\AutomaticLineEnderCommandHandler_Helpers.cs (1)
851.WithAdditionalAnnotations(s_openBracePositionAnnotation);
EventHookup\EventHookupCommandHandler_TabKeyCommand.cs (1)
218.ReplaceToken(plusEqualsToken, plusEqualsToken.WithAdditionalAnnotations(plusEqualsTokenAnnotation))
Microsoft.CodeAnalysis.CSharp.Features (14)
BraceCompletion\AbstractCurlyBraceOrBracketCompletionService.cs (1)
264var newCloseBraceToken = closeBraceToken.WithAdditionalAnnotations(s_closingBraceFormatAnnotation);
CodeRefactorings\InlineTemporary\InlineTemporaryCodeRefactoringProvider.cs (1)
344.WithAdditionalAnnotations(Formatter.Annotation);
CodeRefactorings\InlineTemporary\InlineTemporaryCodeRefactoringProvider.ReferenceRewriter.cs (1)
39return node.Update(node.Identifier.WithAdditionalAnnotations(CreateConflictAnnotation()));
CodeRefactorings\SyncNamespace\CSharpChangeNamespaceService.cs (1)
269.WithAdditionalAnnotations(WarningAnnotation);
ConvertForEachToFor\CSharpConvertForEachToForCodeRefactoringProvider.cs (1)
92indexVariable.WithAdditionalAnnotations(RenameAnnotation.Create()),
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (2)
91_methodName = nameToken.WithAdditionalAnnotations(MethodNameAnnotation); 514var newIdentifier = identifier.WithAdditionalAnnotations(annotation);
IntroduceVariable\CSharpIntroduceVariableService_IntroduceField.cs (1)
49newNameToken.WithAdditionalAnnotations(RenameAnnotation.Create()),
IntroduceVariable\CSharpIntroduceVariableService_IntroduceLocal.cs (1)
48newLocalNameToken.WithAdditionalAnnotations(RenameAnnotation.Create()),
IntroduceVariable\CSharpIntroduceVariableService_IntroduceQueryLocal.cs (1)
37newLocalNameToken.WithAdditionalAnnotations(RenameAnnotation.Create()),
ReplaceMethodWithProperty\CSharpReplaceMethodWithPropertyService.cs (3)
126nameToken = nameToken.WithAdditionalAnnotations(WarningAnnotation.Create(warning)); 327editor.ReplaceNode(nameNode, newName.WithIdentifier(newName.Identifier.WithAdditionalAnnotations(annotation))); 386editor.ReplaceNode(nameNode, newName.WithIdentifier(newName.Identifier.WithAdditionalAnnotations(annotation)));
UsePatternMatching\CSharpIsAndCastCheckWithoutNameDiagnosticAnalyzer.cs (1)
196.WithAdditionalAnnotations(RenameAnnotation.Create());
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (7)
IncrementalParsing\IncrementalParsingTests.cs (1)
2681var oldRoot = tempRoot.ReplaceToken(tempToken, tempToken.WithAdditionalAnnotations(new SyntaxAnnotation()));
Syntax\SyntaxAnnotationTests.cs (6)
35var newToken = oldToken.WithAdditionalAnnotations(annotation); 196var annotatedToken = token.WithAdditionalAnnotations(annotation1); 206var twiceAnnotatedToken = token2.WithAdditionalAnnotations(annotation2); 589var newToken = nodeOrToken.AsToken().WithAdditionalAnnotations(annotation); 739return base.VisitToken(token).WithAdditionalAnnotations(_annotation); 789return base.VisitToken(token).WithAdditionalAnnotations(annotation);
Microsoft.CodeAnalysis.CSharp.Workspaces (15)
CSharpSimplificationHelpers.cs (2)
54.WithAdditionalAnnotations(Simplifier.Annotation); 85tokenWithLeadingWhitespace = token.WithLeadingTrivia(SyntaxFactory.ElasticMarker).WithAdditionalAnnotations(Formatter.Annotation);
CSharpSyntaxFactsService.cs (2)
99.WithAdditionalAnnotations(Formatter.Annotation); 109braces.closeBrace.WithAdditionalAnnotations(Formatter.Annotation));
Rename\CSharpRenameRewriterLanguageService.cs (1)
632newToken = newToken.WithAdditionalAnnotations(Simplifier.Annotation);
Simplification\CSharpSimplificationService.cs (3)
87var rewrittenToken = TryEscapeIdentifierToken(rewriter.VisitToken(token), token.Parent).WithAdditionalAnnotations(Simplifier.Annotation); 136.WithAdditionalAnnotations(Simplifier.Annotation); 167tokenWithLeadingWhitespace = token.WithLeadingTrivia(SyntaxFactory.ElasticMarker).WithAdditionalAnnotations(Formatter.Annotation);
Simplification\CSharpSimplificationService.Expander.cs (4)
537newIdentifier = newIdentifier.WithAdditionalAnnotations(_annotationForReplacedAliasIdentifier); 541return newIdentifier.WithAdditionalAnnotations(aliasAnnotationInfo); 597identifier = identifier.WithAdditionalAnnotations(SimplificationHelpers.DontSimplifyAnnotation); 607identifier = TryEscapeIdentifierToken(identifier, originalSimpleName).WithAdditionalAnnotations(Simplifier.Annotation);
Simplification\CSharpSimplificationService.NodesAndTokensToReduceComputer.cs (1)
96return token.WithAdditionalAnnotations(SimplificationHelpers.DontSimplifyAnnotation);
StringExtensions.cs (1)
51token = token.WithAdditionalAnnotations(Simplifier.Annotation);
TypeDeclarationSyntaxExtensions.cs (1)
104return SyntaxFactory.Token(leadingTrivia, kind, trailingTrivia).WithAdditionalAnnotations(Formatter.Annotation);
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (1)
Formatting\FormattingTriviaTests.cs (1)
1789.WithAdditionalAnnotations(SyntaxAnnotation.ElasticAnnotation));
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (1)
Simplification\AbstractSimplificationTests.vb (1)
88root = root.ReplaceToken(token, token.WithAdditionalAnnotations(Simplifier.Annotation))
Microsoft.CodeAnalysis.Features (24)
AbstractAddAnonymousTypeMemberNameCodeFixProvider.cs (1)
131nameToken = nameToken.WithAdditionalAnnotations(annotation);
AddImport\References\Reference.cs (1)
95root = root.ReplaceToken(identifier, newIdentifier.WithAdditionalAnnotations(annotation));
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.PragmaHelpers.cs (1)
44newEndToken = root.ReplaceToken(startToken, newStartToken.WithAdditionalAnnotations(annotation)).GetAnnotatedTokens(annotation).Single();
CodeRefactorings\ExtractMethod\AbstractExtractMethodCodeRefactoringProvider.cs (1)
147invocationNameToken.WithAdditionalAnnotations(RenameAnnotation.Create()));
Completion\Providers\AbstractMemberInsertingCompletionProvider.cs (1)
88var annotatedRoot = tree.GetRoot(cancellationToken).ReplaceToken(token, token.WithAdditionalAnnotations(_otherAnnotation));
ConvertAnonymousType\AbstractConvertAnonymousTypeToClassCodeRefactoringProvider.cs (1)
231? g.Identifier(className).WithAdditionalAnnotations(RenameAnnotation.Create())
ConvertForEachToFor\AbstractConvertForEachToForCodeRefactoringProvider.cs (1)
116var collectionVariableToken = generator.Identifier(collectionVariable.ToString()).WithAdditionalAnnotations(RenameAnnotation.Create());
ConvertForToForEach\AbstractConvertForToForEachCodeRefactoringProvider.cs (3)
359foreachIdentifier = foreachIdentifier.WithAdditionalAnnotations(RenameAnnotation.Create()); 483replacementToken = replacementToken.WithAdditionalAnnotations( 489replacementToken = replacementToken.WithAdditionalAnnotations(
ConvertTupleToStruct\AbstractConvertTupleToStructCodeRefactoringProvider.cs (2)
249var newRoot = root.ReplaceToken(token, token.WithAdditionalAnnotations(RenameAnnotation.Create())); 402structNameToken = structNameToken.WithAdditionalAnnotations(RenameAnnotation.Create());
ExtractMethod\AbstractSyntaxTriviaService.cs (4)
80map[tokens[TriviaLocation.BeforeBeginningOfSpan]] = token.WithTrailingTrivia(emptyList).WithAdditionalAnnotations(annotations[TriviaLocation.BeforeBeginningOfSpan]); 83map[tokens[TriviaLocation.AfterBeginningOfSpan]] = token.WithLeadingTrivia(emptyList).WithAdditionalAnnotations(annotations[TriviaLocation.AfterBeginningOfSpan]); 86map[tokens[TriviaLocation.BeforeEndOfSpan]] = token.WithTrailingTrivia(emptyList).WithAdditionalAnnotations(annotations[TriviaLocation.BeforeEndOfSpan]); 89map[tokens[TriviaLocation.AfterEndOfSpan]] = token.WithLeadingTrivia(emptyList).WithAdditionalAnnotations(annotations[TriviaLocation.AfterEndOfSpan]);
ExtractMethod\ExtractMethodResult.cs (1)
92root = root.ReplaceToken(InvocationNameToken, InvocationNameToken.WithAdditionalAnnotations(annotation));
GenerateConstructorFromMembers\AbstractGenerateConstructorFromMembersCodeRefactoringProvider.cs (1)
289var newRoot = root.ReplaceToken(closeParen, closeParen.WithAdditionalAnnotations(NavigationAnnotation.Create()));
ImplementAbstractClass\ImplementAbstractClassData.cs (1)
104_classIdentifier.WithAdditionalAnnotations(ConflictAnnotation.Create(
IntroduceParameter\IntroduceParameterDocumentRewriter.cs (1)
667.WithAdditionalAnnotations(RenameAnnotation.Create()));
IntroduceVariable\AbstractIntroduceLocalForExpressionCodeRefactoringProvider.cs (1)
122nameToken.WithAdditionalAnnotations(RenameAnnotation.Create()),
ReplacePropertyWithMethods\AbstractReplacePropertyWithMethodsService.cs (1)
440token = token.WithAdditionalAnnotations(ConflictAnnotation.Create(conflictMessage));
Shared\Utilities\AnnotatedSymbolMapping.cs (1)
101currentRoots[tree] = root.ReplaceToken(token, token.WithAdditionalAnnotations(annotation));
Snippets\SnippetProviders\AbstractSnippetProvider.cs (1)
152(oldtoken, _) => oldtoken.WithAdditionalAnnotations(SyntaxAnnotation.ElasticAnnotation)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (4)
StringExtensions.vb (1)
78token = token.WithAdditionalAnnotations(Simplifier.Annotation)
VisualBasicConvertToIteratorCodeFixProvider.vb (2)
113Dim iteratorToken As SyntaxToken = Token(SyntaxKind.IteratorKeyword).WithAdditionalAnnotations(Formatter.Annotation) 132Dim iteratorToken As SyntaxToken = Token(SyntaxKind.IteratorKeyword).WithAdditionalAnnotations(Formatter.Annotation)
VisualBasicSimplificationHelpers.vb (1)
30.WithAdditionalAnnotations(Simplifier.Annotation))
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (1)
Utilities\CommandHandlers\AbstractImplementAbstractClassOrInterfaceCommandHandler.vb (1)
153document = document.WithSyntaxRoot(syntaxRoot.ReplaceToken(token, token.WithAdditionalAnnotations(tokenAnnotation)))
Microsoft.CodeAnalysis.VisualBasic.Features (12)
CodeRefactorings\InlineTemporary\VisualBasicInlineTemporaryCodeRefactoringProvider.ReferenceRewriter.vb (1)
52Return node.Update(node.Identifier.WithAdditionalAnnotations(
CodeRefactorings\InlineTemporary\VisualBasicInlineTemporaryCodeRefactoringProvider.vb (2)
313.WithAdditionalAnnotations(Formatter.Annotation) 325.WithAdditionalAnnotations(Formatter.Annotation)
ConvertForEachToFor\VisualBasicConvertForEachToForCodeRefactoringProvider.vb (1)
95DirectCast(generator.IdentifierName(indexVariable.WithAdditionalAnnotations(RenameAnnotation.Create())), VisualBasicSyntaxNode),
ExtractMethod\VisualBasicMethodExtractor.VisualBasicCodeGenerator.vb (1)
52Me._methodName = CreateMethodName().WithAdditionalAnnotations(MethodNameAnnotation)
IntroduceVariable\VisualBasicIntroduceVariableService_IntroduceField.vb (1)
211SyntaxFactory.SingletonSeparatedList(SyntaxFactory.ModifiedIdentifier(newNameToken.WithAdditionalAnnotations(RenameAnnotation.Create()))),
IntroduceVariable\VisualBasicIntroduceVariableService_IntroduceLocal.vb (1)
35SyntaxFactory.SingletonSeparatedList(SyntaxFactory.ModifiedIdentifier(newLocalNameToken.WithAdditionalAnnotations(RenameAnnotation.Create()))),
IntroduceVariable\VisualBasicIntroduceVariableService_IntroduceQueryLocal.vb (1)
29SyntaxFactory.ModifiedIdentifier(newLocalNameToken.WithAdditionalAnnotations(RenameAnnotation.Create()))),
ReplaceMethodWithProperty\VisualBasicReplaceMethodWithPropertyService.vb (2)
76propertyNameToken = propertyNameToken.WithAdditionalAnnotations(WarningAnnotation.Create(warning)) 184editor.ReplaceNode(nameNode, Function(n, g) newName.WithIdentifier(newName.Identifier.WithAdditionalAnnotations(annotation)))
VisualBasicConvertToIteratorCodeFixProvider.vb (2)
113Dim iteratorToken As SyntaxToken = Token(SyntaxKind.IteratorKeyword).WithAdditionalAnnotations(Formatter.Annotation) 132Dim iteratorToken As SyntaxToken = Token(SyntaxKind.IteratorKeyword).WithAdditionalAnnotations(Formatter.Annotation)
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (7)
IncrementalParser\IncrementalParser.vb (1)
1713Dim oldRoot2 = tempRoot2.ReplaceToken(tempToken2, tempToken2.WithAdditionalAnnotations(New SyntaxAnnotation()))
Syntax\SyntaxAnnotationTests.vb (6)
32Dim newToken = oldToken.WithAdditionalAnnotations(annotation) 181Dim annotatedToken = token.WithAdditionalAnnotations(annotation1) 191Dim twiceAnnotatedToken = token2.WithAdditionalAnnotations(annotation2) 536Dim newToken = nodeOrToken.AsToken().WithAdditionalAnnotations(annotation) 685Return MyBase.VisitToken(token).WithAdditionalAnnotations(_annotation) 727Return MyBase.VisitToken(token).WithAdditionalAnnotations(annotation)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (9)
Rename\VisualBasicRenameRewriterLanguageService.vb (1)
581newToken = newToken.WithAdditionalAnnotations(Simplifier.Annotation)
Simplification\VisualBasicSimplificationService.Expander.vb (5)
527newIdentifier = newIdentifier.WithAdditionalAnnotations(Me._annotationForReplacedAliasIdentifier) 531newIdentifier = newIdentifier.WithAdditionalAnnotations(aliasAnnotationInfo) 548newIdentifier = newIdentifier.WithAdditionalAnnotations(Me._annotationForReplacedAliasIdentifier) 552newIdentifier = newIdentifier.WithAdditionalAnnotations(aliasAnnotationInfo) 591identifier = identifier.WithAdditionalAnnotations(SimplificationHelpers.DontSimplifyAnnotation)
Simplification\VisualBasicSimplificationService.NodesAndTokensToReduceComputer.vb (1)
91Return token.WithAdditionalAnnotations(SimplificationHelpers.DontSimplifyAnnotation)
StringExtensions.vb (1)
78token = token.WithAdditionalAnnotations(Simplifier.Annotation)
VisualBasicSimplificationHelpers.vb (1)
30.WithAdditionalAnnotations(Simplifier.Annotation))
Microsoft.CodeAnalysis.Workspaces (6)
AnnotationTable.cs (1)
84=> token.WithAdditionalAnnotations(this.GetOrCreateRealAnnotations(annotations).ToArray());
CodeCleanup\AbstractCodeCleanerService.cs (1)
597return node.ReplaceTokens(tokenMap.Keys, (o, n) => o.WithAdditionalAnnotations(tokenMap[o].ToArray()));
IIndentationService.cs (1)
48var newToken = token.WithAdditionalAnnotations(annotation);
Rename\RenameUtilities.cs (1)
38token = token.WithAdditionalAnnotations(replacementAliasAnnotation);
SimplificationHelpers.cs (1)
58to = to.WithAdditionalAnnotations(DontSimplifyAnnotation);
SyntaxNodeExtensions.cs (1)
296return root.ReplaceTokens(tokenMap.Keys, (o, n) => o.WithAdditionalAnnotations(tokenMap[o]));