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)
42scoped Span<KeyValuePair<string, object?>> tags = _tagsCount <= InlineTags.Length ? 44_overflowTags = new KeyValuePair<string, object?>[_tagsCount + OverflowAdditionalCapacity]; 52public readonly int Count => _tagsCount; 67ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual((uint)index, (uint)_tagsCount, nameof(index)); 74ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual((uint)index, (uint)_tagsCount, nameof(index)); 101int count = _tagsCount; 119Debug.Assert(_overflowTags is not null || _tagsCount == InlineTags.Length); 126else if (_tagsCount == _overflowTags.Length) 128Array.Resize(ref _overflowTags, _tagsCount + OverflowAdditionalCapacity); 131_overflowTags[_tagsCount] = tag; 143if (tags.Length < _tagsCount) 163if (_tagsCount > 0) 178if (index == _tagsCount) 184ArgumentOutOfRangeException.ThrowIfGreaterThan((uint)index, (uint)_tagsCount, nameof(index)); 186if (_tagsCount == InlineTags.Length && _overflowTags is null) 194if (_tagsCount == _overflowTags.Length) 196Array.Resize(ref _overflowTags, _tagsCount + OverflowAdditionalCapacity); 199_overflowTags.AsSpan(index, _tagsCount - index).CopyTo(_overflowTags.AsSpan(index + 1)); 205tags.Slice(index, _tagsCount - index).CopyTo(tags.Slice(index + 1)); 219ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual((uint)index, (uint)_tagsCount, nameof(index)); 222tags.Slice(index + 1, _tagsCount - index - 1).CopyTo(tags.Slice(index)); 280tags = tags.Slice(0, _tagsCount); 308_overflowTags is not null ? _overflowTags.AsSpan(0, _tagsCount) : 309((ReadOnlySpan<KeyValuePair<string, object?>>)_tags).Slice(0, _tagsCount);