45 references to CopyAnnotationsTo
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\SimplificationHelpers.cs (1)
54to = from.CopyAnnotationsTo(to);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\CSharpSimplificationHelpers.cs (1)
48return syntaxToken.CopyAnnotationsTo(
Microsoft.CodeAnalysis.CSharp.Features (2)
ExtractMethod\CSharpMethodExtractor.PostProcessor.cs (2)
67var firstTokenWithAsset = block.OpenBraceToken.CopyAnnotationsTo(firstToken).WithPrependedLeadingTrivia(block.OpenBraceToken.GetAllTrivia()); 71var lastTokenWithAsset = block.CloseBraceToken.CopyAnnotationsTo(lastToken).WithAppendedTrailingTrivia(block.CloseBraceToken.GetAllTrivia());
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (5)
Syntax\SyntaxAnnotationTests.cs (5)
73var annotatedToken = fromToken.CopyAnnotationsTo(toToken); 82var annotatedToken = fromToken.CopyAnnotationsTo(toToken); 91var annotatedToken = fromToken.CopyAnnotationsTo(toToken); 447var newToken = sourceTreeNodeOrTokenEnumerator.Current.AsToken().CopyAnnotationsTo(oldToken); 839return _nodeOrTokenMap[token].AsToken().CopyAnnotationsTo(base.VisitToken(token));
Microsoft.CodeAnalysis.CSharp.Workspaces (13)
Rename\CSharpRenameRewriterLanguageService.cs (2)
620? newToken.CopyAnnotationsTo(SyntaxFactory.VerbatimIdentifier(newToken.LeadingTrivia, currentNewIdentifier, valueText, newToken.TrailingTrivia)) 621: newToken.CopyAnnotationsTo(SyntaxFactory.Identifier(newToken.LeadingTrivia, SyntaxKind.IdentifierToken, currentNewIdentifier, valueText, newToken.TrailingTrivia));
Simplification\CSharpSimplificationService.cs (1)
129return syntaxToken.CopyAnnotationsTo(
Simplification\CSharpSimplificationService.Expander.cs (2)
535var newIdentifier = identifier.CopyAnnotationsTo(_identifier); 602identifier = identifier.CopyAnnotationsTo(VerbatimIdentifier(identifier.LeadingTrivia, name, name, identifier.TrailingTrivia));
Simplification\Reducers\CSharpEscapingReducer.cs (2)
140? originalToken.CopyAnnotationsTo(SyntaxFactory.VerbatimIdentifier(originalToken.LeadingTrivia, unescapedText, originalToken.ValueText, originalToken.TrailingTrivia)) 141: originalToken.CopyAnnotationsTo(SyntaxFactory.Identifier(originalToken.LeadingTrivia, SyntaxKind.IdentifierToken, unescapedText, originalToken.ValueText, originalToken.TrailingTrivia));
Simplification\Simplifiers\ExpressionSimplifier.cs (1)
153memberAccess.Name.Identifier.CopyAnnotationsTo(SyntaxFactory.Identifier(
Simplification\Simplifiers\NameSimplifier.cs (4)
144identifierToken = annotatedNodeOrToken.AsToken().CopyAnnotationsTo(identifierToken); 157identifierToken = annotatedNodeOrToken.AsToken().CopyAnnotationsTo(identifierToken); 316((AliasQualifiedNameSyntax)name).Name.Identifier.CopyAnnotationsTo( 517var newIdentifierToken = identifierToken.CopyAnnotationsTo(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\CSharpSimplificationHelpers.cs (1)
48return syntaxToken.CopyAnnotationsTo(
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Utilities\VisualBasicSimplificationHelpers.vb (1)
28Return identifierToken.CopyAnnotationsTo(
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (5)
Syntax\SyntaxAnnotationTests.vb (5)
65Dim annotatedToken = fromToken.CopyAnnotationsTo(toToken) 73Dim annotatedToken = fromToken.CopyAnnotationsTo(toToken) 81Dim annotatedToken = fromToken.CopyAnnotationsTo(toToken) 411Dim newToken = sourceTreeNodeOrTokenEnumerator.Current.AsToken().CopyAnnotationsTo(oldToken) 769Return Me._nodeOrTokenMap(token).AsToken().CopyAnnotationsTo(MyBase.VisitToken(token))
Microsoft.CodeAnalysis.VisualBasic.Workspaces (16)
CodeCleanup\Providers\AbstractTokensCodeCleanupProvider.vb (2)
84Return token.CopyAnnotationsTo(SyntaxFactory.Token(leading, kind, trailing)) 95Return token.CopyAnnotationsTo(SyntaxFactory.Identifier(leading, newValueText, trailing))
CodeCleanup\Providers\ReduceTokensCodeCleanupProvider.vb (3)
301Return token.CopyAnnotationsTo(SyntaxFactory.FloatingLiteralToken(leading, newValueString, token.GetTypeCharacter(), DirectCast(newValue, Double), trailing)) 303Return token.CopyAnnotationsTo(SyntaxFactory.DecimalLiteralToken(leading, newValueString, token.GetTypeCharacter(), DirectCast(newValue, Decimal), trailing)) 305Return token.CopyAnnotationsTo(SyntaxFactory.IntegerLiteralToken(leading, newValueString, token.GetBase().Value, token.GetTypeCharacter(), DirectCast(newValue, ULong), trailing))
Rename\VisualBasicRenameRewriterLanguageService.vb (1)
559newToken = newToken.CopyAnnotationsTo(SyntaxFactory.BracketedIdentifier(newToken.LeadingTrivia, valueText, newToken.TrailingTrivia))
Simplification\Reducers\VisualBasicEscapingReducer.vb (2)
213originalToken.CopyAnnotationsTo(SyntaxFactory.BracketedIdentifier(originalToken.LeadingTrivia, originalToken.ValueText, originalToken.TrailingTrivia)), 214originalToken.CopyAnnotationsTo(SyntaxFactory.Identifier(originalToken.LeadingTrivia, originalToken.ValueText, originalToken.TrailingTrivia)))
Simplification\Simplifiers\NameSimplifier.vb (3)
88identifierToken = annotatedNodeOrToken.AsToken().CopyAnnotationsTo(identifierToken) 97identifierToken = annotatedNodeOrToken.AsToken().CopyAnnotationsTo(identifierToken) 382Dim newIdentifierToken = identifierToken.CopyAnnotationsTo(
Simplification\VisualBasicSimplificationService.Expander.vb (4)
524Dim newIdentifier = identifier.CopyAnnotationsTo(qualifiedReplacement.Right.Identifier) 545Dim newIdentifier = identifier.CopyAnnotationsTo(identifierReplacement.Identifier) 585identifier.CopyAnnotationsTo(SyntaxFactory.BracketedIdentifier(identifier.LeadingTrivia, newName, identifier.TrailingTrivia)), 586identifier.CopyAnnotationsTo(SyntaxFactory.Identifier(identifier.LeadingTrivia, newName, identifier.TrailingTrivia)))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Utilities\VisualBasicSimplificationHelpers.vb (1)
28Return identifierToken.CopyAnnotationsTo(
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\SimplificationHelpers.cs (1)
54to = from.CopyAnnotationsTo(to);