public async ValueTask OnReferenceFoundAsync( SerializableSymbolAndProjectId definition, SerializableReferenceLocation reference) { ISymbol symbol; lock (_gate) { // The definition may not be in the map if we failed to map it over using TryRehydrateAsync in OnDefinitionFoundAsync. // Just ignore this reference. Note: while this is a degraded experience: // // 1. TryRehydrateAsync logs an NFE so we can track down while we're failing to roundtrip the // definition so we can track down that issue. // 2. NFE'ing and failing to show a result, is much better than NFE'ing and then crashing // immediately afterwards. if (!_definitionMap.TryGetValue(definition, out symbol)) { return; } } var referenceLocation = await reference.RehydrateAsync( _solution, _cancellationToken).ConfigureAwait(false); await _progress.OnReferenceFoundAsync(symbol, referenceLocation).ConfigureAwait(false); }
public async Task OnReferenceFoundAsync( SerializableSymbolAndProjectId definition, SerializableReferenceLocation reference) { var symbolAndProjectId = await definition.RehydrateAsync( _solution, _cancellationToken).ConfigureAwait(false); var referenceLocation = await reference.RehydrateAsync( _solution, _cancellationToken).ConfigureAwait(false); await _progress.OnReferenceFoundAsync(symbolAndProjectId, referenceLocation).ConfigureAwait(false); }
public async Task OnReferenceFoundAsync( SerializableSymbolAndProjectId definition, SerializableReferenceLocation reference) { ISymbol symbol; lock (_gate) { symbol = _definitionMap[definition]; } var referenceLocation = await reference.RehydrateAsync( _solution, _cancellationToken).ConfigureAwait(false); await _progress.OnReferenceFoundAsync(symbol, referenceLocation).ConfigureAwait(false); }