6 writes to _tagsCount
System.Diagnostics.DiagnosticSource (6)
System\Diagnostics\Metrics\TagList.netcore.cs (6)
40
_tagsCount
= tagList.Length;
105
_tagsCount
++;
132
_tagsCount
++;
209
_tagsCount
++;
223
_tagsCount
--;
230
_tagsCount
= 0;
24 references to _tagsCount
System.Diagnostics.DiagnosticSource (24)
System\Diagnostics\Metrics\TagList.netcore.cs (24)
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
)
163
if (
_tagsCount
> 0)
178
if (index ==
_tagsCount
)
184
ArgumentOutOfRangeException.ThrowIfGreaterThan((uint)index, (uint)
_tagsCount
, nameof(index));
186
if (
_tagsCount
== InlineTags.Length && _overflowTags is null)
194
if (
_tagsCount
== _overflowTags.Length)
196
Array.Resize(ref _overflowTags,
_tagsCount
+ OverflowAdditionalCapacity);
199
_overflowTags.AsSpan(index,
_tagsCount
- index).CopyTo(_overflowTags.AsSpan(index + 1));
205
tags.Slice(index,
_tagsCount
- index).CopyTo(tags.Slice(index + 1));
219
ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual((uint)index, (uint)
_tagsCount
, nameof(index));
222
tags.Slice(index + 1,
_tagsCount
- index - 1).CopyTo(tags.Slice(index));
280
tags = tags.Slice(0,
_tagsCount
);
308
_overflowTags is not null ? _overflowTags.AsSpan(0,
_tagsCount
) :
309
((ReadOnlySpan<KeyValuePair<string, object?>>)_tags).Slice(0,
_tagsCount
);