| | | 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 | | |
| | | 6 | | namespace 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 |
| | 0 | 20 | | 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 |
| | 0 | 26 | | 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 |
| | 0 | 32 | | 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 |
| | 0 | 38 | | public JsonNumberHandling NumberHandling { get; init; } |
| | | 39 | | |
| | | 40 | | /// <summary> |
| | | 41 | | /// An optimized serialization implementation assuming pre-determined <see cref="JsonSourceGenerationOptionsAttr |
| | | 42 | | /// </summary> |
| | | 43 | | /// <remarks>This API is for use by the output of the System.Text.Json source generator and should not be called |
| | 0 | 44 | | public Action<Utf8JsonWriter, TCollection>? SerializeHandler { get; init; } |
| | | 45 | | } |
| | | 46 | | } |