< Summary

Information
Class: System.Text.Json.Serialization.Converters.ConcurrentStackOfTConverter<T1, T2>
Assembly: System.Text.Json
File(s): C:\h\w\B31A098C\w\BB5A0A33\e\runtime-utils\Runner\runtime\src\libraries\System.Text.Json\src\System\Text\Json\Serialization\Converters\Collection\ConcurrentStackOfTConverter.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 4
Coverable lines: 4
Total lines: 19
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity NPath complexity Sequence coverage
Add(TElement& modreq(...)100%110%

File(s)

C:\h\w\B31A098C\w\BB5A0A33\e\runtime-utils\Runner\runtime\src\libraries\System.Text.Json\src\System\Text\Json\Serialization\Converters\Collection\ConcurrentStackOfTConverter.cs

#LineLine coverage
 1// Licensed to the .NET Foundation under one or more agreements.
 2// The .NET Foundation licenses this file to you under the MIT license.
 3
 4using System.Collections.Concurrent;
 5
 6namespace System.Text.Json.Serialization.Converters
 7{
 8    internal sealed class ConcurrentStackOfTConverter<TCollection, TElement>
 9        : IEnumerableDefaultConverter<TCollection, TElement>
 10        where TCollection : ConcurrentStack<TElement>
 11    {
 012        internal override bool CanPopulate => true;
 13
 14        protected override void Add(in TElement value, ref ReadStack state)
 015        {
 016            ((TCollection)state.Current.ReturnValue!).Push(value);
 017        }
 18    }
 19}