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();
401
var publicApiMap = PooledDictionary<string,
ApiLine
>.GetInstance(StringComparer.Ordinal);
409
private static void ValidateApiList(ImmutableDictionary<AdditionalText, SourceText> additionalFiles, Dictionary<string,
ApiLine
> publicApiMap, ImmutableArray<
ApiLine
> apiList, bool isPublic, List<Diagnostic> errors)
411
foreach (
ApiLine
cur in apiList)
414
if (publicApiMap.TryGetValue(textWithoutOblivious, out
ApiLine
existingLine))
DeclarePublicApiAnalyzer.Impl.cs (16)
59
private readonly record struct RemovedApiLine(string Text,
ApiLine
ApiLine);
64
private sealed record ApiData(ImmutableArray<
ApiLine
> ApiList, ImmutableArray<RemovedApiLine> RemovedApiList, int NullableLineNumber)
66
public static readonly ApiData Empty = new(ImmutableArray<
ApiLine
>.Empty, ImmutableArray<RemovedApiLine>.Empty, NullableLineNumber: -1);
86
private readonly Lazy<IReadOnlyDictionary<string,
ApiLine
>> _apiMap;
96
_apiMap = new Lazy<IReadOnlyDictionary<string,
ApiLine
>>(() => CreateApiMap(shippedData, unshippedData));
100
static IReadOnlyDictionary<string,
ApiLine
> CreateApiMap(ApiData shippedData, ApiData unshippedData)
104
var publicApiMap = new Dictionary<string,
ApiLine
>(shippedData.ApiList.Length + unshippedData.ApiList.Length, StringComparer.Ordinal);
105
foreach (
ApiLine
cur in shippedData.ApiList)
110
foreach (
ApiLine
cur in unshippedData.ApiList)
238
IReadOnlyDictionary<string,
ApiLine
> apiMap = _apiMap.Value;
250
ApiLine
foundApiLine;
377
var isOverloadUnshipped = !lookupPublicApi(overloadPublicApiName, out
ApiLine
overloadPublicApiLine) ||
451
bool lookupPublicApi(ApiName overloadPublicApiName, out
ApiLine
overloadPublicApiLine)
519
foreach (
var
apiLine in _unshippedData.ApiList)
752
IReadOnlyDictionary<string,
ApiLine
> apiMap = _apiMap.Value;
753
foreach (KeyValuePair<string,
ApiLine
> pair in apiMap)