public Task <SerializableConflictResolution?> ResolveConflictsAsync( PinnedSolutionInfo solutionInfo, SerializableRenameLocations renameLocationSet, string replacementText, SerializableSymbolAndProjectId[] nonConflictSymbolIds, CancellationToken cancellationToken) { return(RunServiceAsync <SerializableConflictResolution?>(async() => { using (UserOperationBooster.Boost()) { var solution = await GetSolutionAsync(solutionInfo, cancellationToken).ConfigureAwait(false); var nonConflictSymbols = await GetNonConflictSymbolsAsync(solution, nonConflictSymbolIds, cancellationToken).ConfigureAwait(false); var rehydratedSet = await RenameLocations.TryRehydrateAsync(solution, renameLocationSet, cancellationToken).ConfigureAwait(false); if (rehydratedSet == null) { return null; } var result = await ConflictResolver.ResolveConflictsAsync( rehydratedSet, replacementText, nonConflictSymbols, cancellationToken).ConfigureAwait(false); return await result.DehydrateAsync(cancellationToken).ConfigureAwait(false); } }, cancellationToken)); }
internal static async Task <RenameLocations?> TryRehydrateAsync(Solution solution, SerializableRenameLocations locations, CancellationToken cancellationToken) { if (locations == null) { return(null); } if (locations.Symbol == null) { return(null); } var symbol = await locations.Symbol.TryRehydrateAsync(solution, cancellationToken).ConfigureAwait(false); if (symbol == null) { return(null); } Contract.ThrowIfNull(locations.Result); return(new RenameLocations( symbol, solution, locations.Options.Rehydrate(), await locations.Result.RehydrateAsync(solution, cancellationToken).ConfigureAwait(false))); }