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