< Summary

Information
Line coverage
0%
Covered lines: 0
Uncovered lines: 1
Coverable lines: 1
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
CreateResolver()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\ReferenceHandlerOfT.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
 4namespace System.Text.Json.Serialization
 5{
 6    /// <summary>
 7    /// This class defines how the <see cref="JsonSerializer"/> deals with references on serialization and deserializati
 8    /// </summary>
 9    /// <typeparam name="T">The type of the <see cref="ReferenceResolver"/> to create on each serialization or deseriali
 10    public sealed class ReferenceHandler<T> : ReferenceHandler
 11        where T : ReferenceResolver, new()
 12    {
 13        /// <summary>
 14        /// Creates a new <see cref="ReferenceResolver"/> of type <typeparamref name="T"/> used for each serialization c
 15        /// </summary>
 16        /// <returns>The new resolver to use for serialization and deserialization.</returns>
 017        public override ReferenceResolver CreateResolver() => new T();
 18    }
 19}

Methods/Properties

CreateResolver()