C# Class Microsoft.DotNet.CodeFormatting.Rules.PrivateFieldNamingRule.CommonRule

显示文件 Open project: VE-2016/VE-2016

Public Methods

Method Description
ProcessAsync ( Document document, SyntaxNode syntaxRoot, CancellationToken cancellationToken ) : Task

Protected Methods

Method Description
AddPrivateFieldAnnotations ( SyntaxNode syntaxNode, int &count ) : SyntaxNode
RemoveRenameAnnotations ( SyntaxNode syntaxNode ) : SyntaxNode

This method exists to work around DevDiv 1086632 in Roslyn. The Rename action is leaving a set of annotations in the tree. These annotations slow down further processing and eventually make the rename operation unusable. As a temporary work around we manually remove these from the tree.

Private Methods

Method Description
CleanSolutionAsync ( Solution newSolution, Solution oldSolution, CancellationToken cancellationToken ) : Task
CleanSolutionDocument ( Solution solution, DocumentId documentId, CancellationToken cancellationToken ) : Task
GetNewFieldName ( ISymbol fieldSymbol ) : string
RenameFields ( Solution solution, DocumentId documentId, int count, CancellationToken cancellationToken ) : Task

Method Details

AddPrivateFieldAnnotations() protected abstract method

protected abstract AddPrivateFieldAnnotations ( SyntaxNode syntaxNode, int &count ) : SyntaxNode
syntaxNode SyntaxNode
count int
return SyntaxNode

ProcessAsync() public method

public ProcessAsync ( Document document, SyntaxNode syntaxRoot, CancellationToken cancellationToken ) : Task
document Document
syntaxRoot SyntaxNode
cancellationToken CancellationToken
return Task

RemoveRenameAnnotations() protected abstract method

This method exists to work around DevDiv 1086632 in Roslyn. The Rename action is leaving a set of annotations in the tree. These annotations slow down further processing and eventually make the rename operation unusable. As a temporary work around we manually remove these from the tree.
protected abstract RemoveRenameAnnotations ( SyntaxNode syntaxNode ) : SyntaxNode
syntaxNode SyntaxNode
return SyntaxNode