Skip to content

Commit a97f2ee

Browse files
Make synchronous
1 parent f64a751 commit a97f2ee

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

src/Workspaces/Core/Portable/Rename/RenameUtilities.cs

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -211,19 +211,15 @@ public static IEnumerable<ISymbol> GetOverloadedSymbols(ISymbol symbol)
211211
ISymbol symbol, Solution solution, CancellationToken cancellationToken)
212212
{
213213
if (symbol.IsPropertyAccessor())
214-
{
215214
return ((IMethodSymbol)symbol).AssociatedSymbol;
216-
}
217215

218216
if (symbol.IsOverride && symbol.GetOverriddenMember() != null)
219217
{
220-
var originalSourceSymbol = await SymbolFinder.FindSourceDefinitionAsync(
221-
symbol.GetOverriddenMember(), solution, cancellationToken).ConfigureAwait(false);
218+
var originalSourceSymbol = SymbolFinder.FindSourceDefinition(
219+
symbol.GetOverriddenMember(), solution, cancellationToken);
222220

223221
if (originalSourceSymbol != null)
224-
{
225222
return await TryGetPropertyFromAccessorOrAnOverrideAsync(originalSourceSymbol, solution, cancellationToken).ConfigureAwait(false);
226-
}
227223
}
228224

229225
if (symbol.Kind == SymbolKind.Method &&
@@ -236,9 +232,7 @@ public static IEnumerable<ISymbol> GetOverloadedSymbols(ISymbol symbol)
236232
{
237233
var propertyAccessorOrAnOverride = await TryGetPropertyFromAccessorOrAnOverrideAsync(methodImplementor, solution, cancellationToken).ConfigureAwait(false);
238234
if (propertyAccessorOrAnOverride != null)
239-
{
240235
return propertyAccessorOrAnOverride;
241-
}
242236
}
243237
}
244238

@@ -325,8 +319,8 @@ public static async Task<ISymbol> FindDefinitionSymbolAsync(
325319
Contract.ThrowIfNull(solution);
326320

327321
// Make sure we're on the original source definition if we can be
328-
var foundSymbol = await SymbolFinder.FindSourceDefinitionAsync(
329-
symbol, solution, cancellationToken).ConfigureAwait(false);
322+
var foundSymbol = SymbolFinder.FindSourceDefinition(
323+
symbol, solution, cancellationToken);
330324

331325
var bestSymbol = foundSymbol ?? symbol;
332326
symbol = bestSymbol;
@@ -384,7 +378,7 @@ MethodKind.StaticConstructor or
384378
}
385379

386380
// in case this is e.g. an overridden property accessor, we'll treat the property itself as the definition symbol
387-
var property = await RenameUtilities.TryGetPropertyFromAccessorOrAnOverrideAsync(bestSymbol, solution, cancellationToken).ConfigureAwait(false);
381+
var property = await TryGetPropertyFromAccessorOrAnOverrideAsync(bestSymbol, solution, cancellationToken).ConfigureAwait(false);
388382

389383
return property ?? bestSymbol;
390384
}

0 commit comments

Comments
 (0)