public RenameReferencesInFile ( IList |
||
searchScopes | IList |
|
newName | string | |
resolver | ICSharpCode.NRefactory.CSharp.Resolver.CSharpAstResolver | |
callback | Action |
|
errorCallback | Action |
|
cancellationToken | ||
return | void |
IList <AstNode> Rename(string fullyQualifiedName, string newName, bool includeOverloads) { var sym = GetSymbol(compilation, fullyQualifiedName); Assert.NotNull(sym); var graph = new TypeGraph(compilation.Assemblies); var col = new SymbolCollector(); col.IncludeOverloads = includeOverloads; col.GroupForRenaming = true; var scopes = findReferences.GetSearchScopes(col.GetRelatedSymbols(graph, sym)); List <AstNode> result = new List <AstNode>(); findReferences.RenameReferencesInFile( scopes, newName, new CSharpAstResolver(compilation, syntaxTree, unresolvedFile), delegate(RenameCallbackArguments obj) { result.Add(obj.NodeToReplace); }, delegate(Error obj) { }); return(result); }