| | | 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 | | |
| | | 4 | | using System.ComponentModel; |
| | | 5 | | using System.Reflection; |
| | | 6 | | |
| | | 7 | | namespace 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 |
| | 0 | 21 | | 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 |
| | 0 | 27 | | 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 |
| | 0 | 33 | | 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 |
| | 0 | 39 | | public Func<JsonParameterInfoValues[]>? ConstructorParameterMetadataInitializer { get; init; } |
| | | 40 | | |
| | | 41 | | /// <summary> |
| | | 42 | | /// Provides a delayed attribute provider corresponding to the deserialization constructor. |
| | | 43 | | /// </summary> |
| | 0 | 44 | | 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 |
| | 0 | 50 | | public JsonNumberHandling NumberHandling { get; init; } |
| | | 51 | | |
| | | 52 | | /// <summary> |
| | | 53 | | /// Provides a serialization implementation for instances of the class or struct which assumes options specified |
| | | 54 | | /// </summary> |
| | | 55 | | /// <remarks>This API is for use by the output of the System.Text.Json source generator and should not be called |
| | 0 | 56 | | public Action<Utf8JsonWriter, T>? SerializeHandler { get; init; } |
| | | 57 | | } |
| | | 58 | | } |