1 instantiation of ApiLine
Microsoft.CodeAnalysis.PublicApiAnalyzers (1)
DeclarePublicApiAnalyzer.cs (1)
183var apiLine = new ApiLine(text, line.Span, additionalFileInfo);
24 references to ApiLine
Microsoft.CodeAnalysis.PublicApiAnalyzers (24)
DeclarePublicApiAnalyzer.cs (8)
159var apiBuilder = ArrayBuilder<ApiLine>.GetInstance(); 183var apiLine = new ApiLine(text, line.Span, additionalFileInfo); 254var apiBuilder = ArrayBuilder<ApiLine>.GetInstance(); 398using var publicApiMap = PooledDictionary<string, ApiLine>.GetInstance(StringComparer.Ordinal); 405private static void ValidateApiList(ImmutableDictionary<AdditionalText, SourceText> additionalFiles, Dictionary<string, ApiLine> publicApiMap, ImmutableArray<ApiLine> apiList, bool isPublic, List<Diagnostic> errors) 407foreach (ApiLine cur in apiList) 410if (publicApiMap.TryGetValue(textWithoutOblivious, out ApiLine existingLine))
DeclarePublicApiAnalyzer.Impl.cs (16)
56private readonly record struct RemovedApiLine(string Text, ApiLine ApiLine); 61private sealed record ApiData(ImmutableArray<ApiLine> ApiList, ImmutableArray<RemovedApiLine> RemovedApiList, int NullableLineNumber) 63public static readonly ApiData Empty = new(ImmutableArray<ApiLine>.Empty, ImmutableArray<RemovedApiLine>.Empty, NullableLineNumber: -1); 83private readonly Lazy<IReadOnlyDictionary<string, ApiLine>> _apiMap; 93_apiMap = new Lazy<IReadOnlyDictionary<string, ApiLine>>(() => CreateApiMap(shippedData, unshippedData)); 97static IReadOnlyDictionary<string, ApiLine> CreateApiMap(ApiData shippedData, ApiData unshippedData) 101var publicApiMap = new Dictionary<string, ApiLine>(shippedData.ApiList.Length + unshippedData.ApiList.Length, StringComparer.Ordinal); 102foreach (ApiLine cur in shippedData.ApiList) 107foreach (ApiLine cur in unshippedData.ApiList) 235IReadOnlyDictionary<string, ApiLine> apiMap = _apiMap.Value; 247ApiLine foundApiLine; 374var isOverloadUnshipped = !lookupPublicApi(overloadPublicApiName, out ApiLine overloadPublicApiLine) || 448bool lookupPublicApi(ApiName overloadPublicApiName, out ApiLine overloadPublicApiLine) 516foreach (var apiLine in _unshippedData.ApiList) 748IReadOnlyDictionary<string, ApiLine> apiMap = _apiMap.Value; 749foreach (KeyValuePair<string, ApiLine> pair in apiMap)