public void OnDefinitionFound(ISymbol symbol) { if (FilterDefinition(symbol)) { return; } // Partial types can have more than one declaring syntax references. // Add remote locations for all the syntax references except the queried syntax node. // To query for the partial locations, filter definition locations that occur in source whose span is part of // span of any syntax node from Definition.DeclaringSyntaxReferences except for the queried syntax node. _locations.AddRange(symbol.Locations.Intersect(_queriedSymbol.Locations, LocationComparer.Instance).Any() ? GetPartialLocations(symbol, _queriedNode, _aggregateCancellationTokenSource.Token) : symbol.Locations); if (SearchCapReached) { _aggregateCancellationTokenSource.Cancel(); } }