< Summary

Line coverage
0%
Covered lines: 0
Uncovered lines: 9
Coverable lines: 9
Total lines: 72
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/JsonObjectInfoValuesOfT.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;
 5using System.Reflection;
 6
 7namespace System.Text.Json.Serialization.Metadata
 8{
 9    /// <summary>
 10    /// Provides serialization metadata about an object type with constructors, properties, and fields.
 11    /// </summary>
 12    /// <typeparam name="T">The object type to serialize or deserialize.</typeparam>
 13    /// <remarks>This API is for use by the output of the System.Text.Json source generator and should not be called dir
 14    [EditorBrowsable(EditorBrowsableState.Never)]
 15    public sealed class JsonObjectInfoValues<T>
 16    {
 17        /// <summary>
 18        /// Provides a mechanism to create an instance of the class or struct when deserializing, using a parameterless 
 19        /// </summary>
 20        /// <remarks>This API is for use by the output of the System.Text.Json source generator and should not be called
 021        public Func<T>? ObjectCreator { get; init; }
 22
 23        /// <summary>
 24        /// Provides a mechanism to create an instance of the class or struct when deserializing, using a parameterized 
 25        /// </summary>
 26        /// <remarks>This API is for use by the output of the System.Text.Json source generator and should not be called
 027        public Func<object[], T>? ObjectWithParameterizedConstructorCreator { get; init; }
 28
 29        /// <summary>
 30        /// Provides a mechanism to initialize metadata for properties and fields of the class or struct.
 31        /// </summary>
 32        /// <remarks>This API is for use by the output of the System.Text.Json source generator and should not be called
 033        public Func<JsonSerializerContext, JsonPropertyInfo[]>? PropertyMetadataInitializer { get; init; }
 34
 35        /// <summary>
 36        /// Provides a mechanism to initialize metadata for a parameterized constructor of the class or struct to be use
 37        /// </summary>
 38        /// <remarks>This API is for use by the output of the System.Text.Json source generator and should not be called
 039        public Func<JsonParameterInfoValues[]>? ConstructorParameterMetadataInitializer { get; init; }
 40
 41        /// <summary>
 42        /// Provides a delayed attribute provider corresponding to the deserialization constructor.
 43        /// </summary>
 044        public Func<ICustomAttributeProvider>? ConstructorAttributeProviderFactory { get; init; }
 45
 46        /// <summary>
 47        /// Specifies how number properties and fields should be processed when serializing and deserializing.
 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 JsonNumberHandling NumberHandling { get; init; }
 51
 52        /// <summary>
 53        /// Specifies polymorphism metadata to apply to the class or struct.
 54        /// </summary>
 55        /// <remarks>This API is for use by the output of the System.Text.Json source generator and should not be called
 056        public JsonPolymorphismOptions? PolymorphismOptions { get; init; }
 57
 58        /// <summary>
 59        /// Provides a serialization implementation for instances of the class or struct which assumes options specified
 60        /// </summary>
 61        /// <remarks>This API is for use by the output of the System.Text.Json source generator and should not be called
 062        public Action<Utf8JsonWriter, T>? SerializeHandler { get; init; }
 63
 64        /// <summary>
 65        /// Gets or sets a factory used to lazily construct a <see cref="JsonTypeClassifier"/>
 66        /// from the polymorphic type's metadata at <see cref="JsonTypeInfo"/> configuration time.
 67        /// </summary>
 68        /// <remarks>This API is for use by the output of the System.Text.Json source generator and should not be called
 069        public JsonTypeClassifierFactory? TypeClassifierFactory { get; init; }
 70    }
 71}
 72