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)
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) 174if (index == _tagsCount) 180ArgumentOutOfRangeException.ThrowIfGreaterThan((uint)index, (uint)_tagsCount, nameof(index)); 182if (_tagsCount == InlineTags.Length && _overflowTags is null) 190if (_tagsCount == _overflowTags.Length) 192Array.Resize(ref _overflowTags, _tagsCount + OverflowAdditionalCapacity); 195_overflowTags.AsSpan(index, _tagsCount - index).CopyTo(_overflowTags.AsSpan(index + 1)); 201tags.Slice(index, _tagsCount - index).CopyTo(tags.Slice(index + 1)); 215ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual((uint)index, (uint)_tagsCount, nameof(index)); 218tags.Slice(index + 1, _tagsCount - index - 1).CopyTo(tags.Slice(index)); 276tags = tags.Slice(0, _tagsCount); 304_overflowTags is not null ? _overflowTags.AsSpan(0, _tagsCount) : 305((ReadOnlySpan<KeyValuePair<string, object?>>)_tags).Slice(0, _tagsCount);