< Summary

Line coverage
0%
Covered lines: 0
Uncovered lines: 7
Coverable lines: 7
Total lines: 60
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

File(s)

https://raw.githubusercontent.com/dotnet/runtime/811a7eabb75c42db53440e8ba3f60c07511cfd1f/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/JsonCollectionInfoValuesOfTCollection.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.ComponentModel;
 5
 6namespace System.Text.Json.Serialization.Metadata
 7{
 8    /// <summary>
 9    /// Provides serialization metadata about a collection type.
 10    /// </summary>
 11    /// <typeparam name="TCollection">The collection type.</typeparam>
 12    /// <remarks>This API is for use by the output of the System.Text.Json source generator and should not be called dir
 13    [EditorBrowsable(EditorBrowsableState.Never)]
 14    public sealed class JsonCollectionInfoValues<TCollection>
 15    {
 16        /// <summary>
 17        /// A <see cref="Func{TResult}"/> to create an instance of the collection when deserializing.
 18        /// </summary>
 19        /// <remarks>This API is for use by the output of the System.Text.Json source generator and should not be called
 020        public Func<TCollection>? ObjectCreator { get; init; }
 21
 22        /// <summary>
 23        /// If a dictionary type, the <see cref="JsonTypeInfo"/> instance representing the key type.
 24        /// </summary>
 25        /// <remarks>This API is for use by the output of the System.Text.Json source generator and should not be called
 026        public JsonTypeInfo? KeyInfo { get; init; }
 27
 28        /// <summary>
 29        /// A <see cref="JsonTypeInfo"/> instance representing the element type.
 30        /// </summary>
 31        /// <remarks>This API is for use by the output of the System.Text.Json source generator and should not be called
 032        public JsonTypeInfo ElementInfo { get; init; } = null!;
 33
 34        /// <summary>
 35        /// The <see cref="JsonNumberHandling"/> option to apply to number collection elements.
 36        /// </summary>
 37        /// <remarks>This API is for use by the output of the System.Text.Json source generator and should not be called
 038        public JsonNumberHandling NumberHandling { get; init; }
 39
 40        /// <summary>
 41        /// Specifies polymorphism metadata to apply to the collection.
 42        /// </summary>
 43        /// <remarks>This API is for use by the output of the System.Text.Json source generator and should not be called
 044        public JsonPolymorphismOptions? PolymorphismOptions { get; init; }
 45
 46        /// <summary>
 47        /// An optimized serialization implementation assuming pre-determined <see cref="JsonSourceGenerationOptionsAttr
 48        /// </summary>
 49        /// <remarks>This API is for use by the output of the System.Text.Json source generator and should not be called
 050        public Action<Utf8JsonWriter, TCollection>? SerializeHandler { get; init; }
 51
 52        /// <summary>
 53        /// Gets or sets a factory used to lazily construct a <see cref="JsonTypeClassifier"/>
 54        /// from the polymorphic type's metadata at <see cref="JsonTypeInfo"/> configuration time.
 55        /// </summary>
 56        /// <remarks>This API is for use by the output of the System.Text.Json source generator and should not be called
 057        public JsonTypeClassifierFactory? TypeClassifierFactory { get; init; }
 58    }
 59}
 60