6 writes to _tagsCount
System.Diagnostics.DiagnosticSource (6)
System\Diagnostics\Metrics\TagList.netcore.cs (6)
40
_tagsCount
= tagList.Length;
105
_tagsCount
++;
132
_tagsCount
++;
205
_tagsCount
++;
219
_tagsCount
--;
226
_tagsCount
= 0;
23 references to _tagsCount
System.Diagnostics.DiagnosticSource (23)
System\Diagnostics\Metrics\TagList.netcore.cs (23)
42
scoped Span<KeyValuePair<string, object?>> tags =
_tagsCount
<= InlineTags.Length ?
44
_overflowTags = new KeyValuePair<string, object?>[
_tagsCount
+ OverflowAdditionalCapacity];
52
public readonly int Count =>
_tagsCount
;
67
ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual((uint)index, (uint)
_tagsCount
, nameof(index));
74
ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual((uint)index, (uint)
_tagsCount
, nameof(index));
101
int count =
_tagsCount
;
119
Debug.Assert(_overflowTags is not null ||
_tagsCount
== InlineTags.Length);
126
else if (
_tagsCount
== _overflowTags.Length)
128
Array.Resize(ref _overflowTags,
_tagsCount
+ OverflowAdditionalCapacity);
131
_overflowTags[
_tagsCount
] = tag;
143
if (tags.Length <
_tagsCount
)
174
if (index ==
_tagsCount
)
180
ArgumentOutOfRangeException.ThrowIfGreaterThan((uint)index, (uint)
_tagsCount
, nameof(index));
182
if (
_tagsCount
== InlineTags.Length && _overflowTags is null)
190
if (
_tagsCount
== _overflowTags.Length)
192
Array.Resize(ref _overflowTags,
_tagsCount
+ OverflowAdditionalCapacity);
195
_overflowTags.AsSpan(index,
_tagsCount
- index).CopyTo(_overflowTags.AsSpan(index + 1));
201
tags.Slice(index,
_tagsCount
- index).CopyTo(tags.Slice(index + 1));
215
ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual((uint)index, (uint)
_tagsCount
, nameof(index));
218
tags.Slice(index + 1,
_tagsCount
- index - 1).CopyTo(tags.Slice(index));
276
tags = tags.Slice(0,
_tagsCount
);
304
_overflowTags is not null ? _overflowTags.AsSpan(0,
_tagsCount
) :
305
((ReadOnlySpan<KeyValuePair<string, object?>>)_tags).Slice(0,
_tagsCount
);