提交 fe728891 编写于 作者: C Cyrus Najmabadi

Remove 'options' parameter, it is redundant

上级 6bbfdc8f
......@@ -41,7 +41,7 @@ public async Task<IInlineRenameReplacementInfo> GetReplacementsAsync(string repl
{
var conflicts = await ConflictResolver.ResolveConflictsAsync(
_renameLocationSet, _renameLocationSet.Symbol.Name,
_renameInfo.GetFinalSymbolName(replacementText), optionSet, nonConflictSymbols: null, cancellationToken: cancellationToken).ConfigureAwait(false);
_renameInfo.GetFinalSymbolName(replacementText), nonConflictSymbols: null, cancellationToken: cancellationToken).ConfigureAwait(false);
return new InlineRenameReplacementInfo(conflicts);
}
......
......@@ -79,7 +79,7 @@ Namespace Microsoft.CodeAnalysis.Editor.UnitTests.Rename
Dim locations = RenameLocations.FindAsync(symbolAndProjectId, workspace.CurrentSolution, optionSet, CancellationToken.None).Result
Dim originalName = symbol.Name.Split("."c).Last()
Dim result = ConflictResolver.ResolveConflictsAsync(locations, originalName, renameTo, optionSet, nonConflictSymbols:=Nothing, cancellationToken:=CancellationToken.None).Result
Dim result = ConflictResolver.ResolveConflictsAsync(locations, originalName, renameTo, nonConflictSymbols:=Nothing, cancellationToken:=CancellationToken.None).Result
engineResult = New RenameEngineResult(workspace, result, renameTo)
engineResult.AssertUnlabeledSpansRenamedAndHaveNoConflicts()
......
......@@ -58,7 +58,6 @@ private class Session
Location renameSymbolDeclarationLocation,
string originalText,
string replacementText,
OptionSet optionSet,
ImmutableHashSet<ISymbol> nonConflictSymbols,
CancellationToken cancellationToken)
{
......@@ -66,7 +65,7 @@ private class Session
_renameSymbolDeclarationLocation = renameSymbolDeclarationLocation;
_originalText = originalText;
_replacementText = replacementText;
_optionSet = optionSet;
_optionSet = renameLocationSet.Options;
_nonConflictSymbols = nonConflictSymbols;
_cancellationToken = cancellationToken;
......
......@@ -43,7 +43,6 @@ internal static partial class ConflictResolver
/// <param name="renameLocationSet">The locations to perform the renaming at.</param>
/// <param name="originalText">The original name of the identifier.</param>
/// <param name="replacementText">The new name of the identifier</param>
/// <param name="optionSet">The option for rename</param>
/// <param name="nonConflictSymbols">Used after renaming references. References that now bind to any of these
/// symbols are not considered to be in conflict. Useful for features that want to rename existing references to
/// point at some existing symbol. Normally this would be a conflict, but this can be used to override that
......@@ -54,7 +53,6 @@ internal static partial class ConflictResolver
RenameLocations renameLocationSet,
string originalText,
string replacementText,
OptionSet optionSet,
ImmutableHashSet<ISymbol> nonConflictSymbols,
CancellationToken cancellationToken)
{
......@@ -71,7 +69,7 @@ internal static partial class ConflictResolver
var session = new Session(
renameLocationSet, renameSymbolDeclarationLocation,
originalText, replacementText,
optionSet, nonConflictSymbols, cancellationToken);
nonConflictSymbols, cancellationToken);
return session.ResolveConflictsAsync();
}
......
......@@ -62,7 +62,7 @@ public static class Renamer
var conflictResolution = await ConflictResolver.ResolveConflictsAsync(
locations, locations.SymbolAndProjectId.Symbol.Name, newName,
locations.Options, nonConflictSymbols, cancellationToken).ConfigureAwait(false);
nonConflictSymbols, cancellationToken).ConfigureAwait(false);
return conflictResolution.NewSolution;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册