1 instantiation of ApiLine
Microsoft.CodeAnalysis.PublicApiAnalyzers (1)
DeclarePublicApiAnalyzer.cs (1)
182
var apiLine = new
ApiLine
(text, line.Span, additionalFileInfo);
24 references to ApiLine
Microsoft.CodeAnalysis.PublicApiAnalyzers (24)
DeclarePublicApiAnalyzer.cs (8)
158
var apiBuilder = ArrayBuilder<
ApiLine
>.GetInstance();
182
var
apiLine = new ApiLine(text, line.Span, additionalFileInfo);
253
var apiBuilder = ArrayBuilder<
ApiLine
>.GetInstance();
383
var publicApiMap = PooledDictionary<string,
ApiLine
>.GetInstance(StringComparer.Ordinal);
391
private static void ValidateApiList(ImmutableDictionary<AdditionalText, SourceText> additionalFiles, Dictionary<string,
ApiLine
> publicApiMap, ImmutableArray<
ApiLine
> apiList, bool isPublic, List<Diagnostic> errors)
393
foreach (
ApiLine
cur in apiList)
396
if (publicApiMap.TryGetValue(textWithoutOblivious, out
ApiLine
existingLine))
DeclarePublicApiAnalyzer.Impl.cs (16)
58
private readonly record struct RemovedApiLine(string Text,
ApiLine
ApiLine);
63
private sealed record ApiData(ImmutableArray<
ApiLine
> ApiList, ImmutableArray<RemovedApiLine> RemovedApiList, int NullableLineNumber)
65
public static readonly ApiData Empty = new(ImmutableArray<
ApiLine
>.Empty, ImmutableArray<RemovedApiLine>.Empty, NullableLineNumber: -1);
85
private readonly Lazy<IReadOnlyDictionary<string,
ApiLine
>> _apiMap;
95
_apiMap = new Lazy<IReadOnlyDictionary<string,
ApiLine
>>(() => CreateApiMap(shippedData, unshippedData));
99
static IReadOnlyDictionary<string,
ApiLine
> CreateApiMap(ApiData shippedData, ApiData unshippedData)
103
var publicApiMap = new Dictionary<string,
ApiLine
>(shippedData.ApiList.Length + unshippedData.ApiList.Length, StringComparer.Ordinal);
104
foreach (
ApiLine
cur in shippedData.ApiList)
109
foreach (
ApiLine
cur in unshippedData.ApiList)
237
IReadOnlyDictionary<string,
ApiLine
> apiMap = _apiMap.Value;
249
ApiLine
foundApiLine;
376
var isOverloadUnshipped = !lookupPublicApi(overloadPublicApiName, out
ApiLine
overloadPublicApiLine) ||
450
bool lookupPublicApi(ApiName overloadPublicApiName, out
ApiLine
overloadPublicApiLine)
518
foreach (
var
apiLine in _unshippedData.ApiList)
751
IReadOnlyDictionary<string,
ApiLine
> apiMap = _apiMap.Value;
752
foreach (KeyValuePair<string,
ApiLine
> pair in apiMap)