private void ProcessReferencedSymbol( Solution solution, ReferencedSymbol referencedSymbol, ArrayBuilder<DefinitionItem> definitions, ArrayBuilder<SourceReferenceItem> references, bool includeHiddenLocations, HashSet<DocumentSpan> uniqueSpans) { // See if this is a symbol we even want to present to the user. If not, // ignore it entirely (including all its reference locations). if (!referencedSymbol.ShouldShow()) { return; } var definitionItem = referencedSymbol.Definition.ToDefinitionItem( solution, includeHiddenLocations, uniqueSpans); definitions.Add(definitionItem); // Now, create the SourceReferenceItems for all the reference locations // for this definition. CreateReferences( referencedSymbol, references, definitionItem, includeHiddenLocations, uniqueSpans); // Finally, see if there are any third parties that want to add their // own result to our collection. var thirdPartyItem = GetThirdPartyDefinitionItem(solution, referencedSymbol.Definition); if (thirdPartyItem != null) { definitions.Add(thirdPartyItem); } }
private void ProcessReferencedSymbol( Solution solution, ReferencedSymbol referencedSymbol, ImmutableArray<DefinitionItem>.Builder definitions, ImmutableArray<SourceReferenceItem>.Builder references, HashSet<DocumentLocation> uniqueLocations) { // See if this is a symbol we even want to present to the user. If not, // ignore it entirely (including all its reference locations). if (!referencedSymbol.ShouldShow()) { return; } // Try to create an item for this definition. If we can't, // ignore it entirely (including all its reference locations). var definitionItem = CreateDefinitionItem(solution, referencedSymbol, uniqueLocations); if (definitionItem == null) { return; } definitions.Add(definitionItem); // Now, create the SourceReferenceItems for all the reference locations // for this definition. CreateReferences(referencedSymbol, references, definitionItem, uniqueLocations); // Finally, see if there are any third parties that want to add their // own result to our collection. var thirdPartyItem = GetThirdPartyDefinitionItem(solution, referencedSymbol.Definition); if (thirdPartyItem != null) { definitions.Add(thirdPartyItem); } }