| | | 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.Collections.Generic; |
| | | 5 | | using System.Text.Json.Serialization.Metadata; |
| | | 6 | | |
| | | 7 | | using FoundProperties = System.ValueTuple<System.Text.Json.Serialization.Metadata.JsonPropertyInfo, System.Text.Json.Jso |
| | | 8 | | using FoundPropertiesAsync = System.ValueTuple<System.Text.Json.Serialization.Metadata.JsonPropertyInfo, object?, string |
| | | 9 | | |
| | | 10 | | namespace System.Text.Json |
| | | 11 | | { |
| | | 12 | | /// <summary> |
| | | 13 | | /// Holds relevant state when deserializing objects with parameterized constructors. |
| | | 14 | | /// Lives on the current ReadStackFrame. |
| | | 15 | | /// </summary> |
| | | 16 | | internal sealed class ArgumentState |
| | | 17 | | { |
| | | 18 | | // Cache for parsed constructor arguments. |
| | 234 | 19 | | public object Arguments = null!; |
| | | 20 | | |
| | | 21 | | // When deserializing objects with parameterized ctors, the properties we find on the first pass. |
| | | 22 | | public FoundProperties[]? FoundProperties; |
| | | 23 | | |
| | | 24 | | // When deserializing objects with parameterized ctors asynchronously, the properties we find on the first pass. |
| | | 25 | | public FoundPropertiesAsync[]? FoundPropertiesAsync; |
| | | 26 | | public int FoundPropertyCount; |
| | | 27 | | |
| | | 28 | | // Current constructor parameter value. |
| | | 29 | | public JsonParameterInfo? JsonParameterInfo; |
| | | 30 | | } |
| | | 31 | | } |