private static Task <ImmutableArray <ReferenceLocation> > FindPredefinedTypeReferencesAsync( INamedTypeSymbol symbol, Document document, CancellationToken cancellationToken) { var predefinedType = symbol.SpecialType.ToPredefinedType(); if (predefinedType == PredefinedType.None) { return(SpecializedTasks.EmptyImmutableArray <ReferenceLocation>()); } var syntaxFacts = document.GetLanguageService <ISyntaxFactsService>(); return(FindReferencesInDocumentAsync(symbol, document, t => IsPotentialReference(predefinedType, syntaxFacts, t), (t, m) => (matched: true, reason: CandidateReason.None), cancellationToken)); }
private static Task <ImmutableArray <FinderLocation> > FindPredefinedTypeReferencesAsync( INamedTypeSymbol symbol, Document document, SemanticModel semanticModel, CancellationToken cancellationToken) { var predefinedType = symbol.SpecialType.ToPredefinedType(); if (predefinedType == PredefinedType.None) { return(SpecializedTasks.EmptyImmutableArray <FinderLocation>()); } var syntaxFacts = document.GetLanguageService <ISyntaxFactsService>(); return(FindReferencesInDocumentAsync(document, semanticModel, t => IsPotentialReference(predefinedType, syntaxFacts, t), (t, m) => (matched: true, reason: CandidateReason.None), docCommentId: null, findInGlobalSuppressions: false, cancellationToken)); }