| | | 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.Diagnostics; |
| | | 6 | | using System.Diagnostics.CodeAnalysis; |
| | | 7 | | using System.Text.Json.Serialization.Metadata; |
| | | 8 | | |
| | | 9 | | namespace System.Text.Json.Serialization.Converters |
| | | 10 | | { |
| | | 11 | | internal sealed class ImmutableDictionaryOfTKeyTValueConverterWithReflection<TCollection, TKey, TValue> |
| | | 12 | | : ImmutableDictionaryOfTKeyTValueConverter<TCollection, TKey, TValue> |
| | | 13 | | where TCollection : IReadOnlyDictionary<TKey, TValue> |
| | | 14 | | where TKey : notnull |
| | | 15 | | { |
| | | 16 | | [RequiresUnreferencedCode(IEnumerableConverterFactoryHelpers.ImmutableConvertersUnreferencedCodeMessage)] |
| | | 17 | | [RequiresDynamicCode(IEnumerableConverterFactoryHelpers.ImmutableConvertersUnreferencedCodeMessage)] |
| | 0 | 18 | | public ImmutableDictionaryOfTKeyTValueConverterWithReflection() |
| | 0 | 19 | | { |
| | 0 | 20 | | } |
| | | 21 | | |
| | | 22 | | [RequiresUnreferencedCode(IEnumerableConverterFactoryHelpers.ImmutableConvertersUnreferencedCodeMessage)] |
| | | 23 | | [RequiresDynamicCode(IEnumerableConverterFactoryHelpers.ImmutableConvertersUnreferencedCodeMessage)] |
| | | 24 | | internal override void ConfigureJsonTypeInfoUsingReflection(JsonTypeInfo jsonTypeInfo, JsonSerializerOptions opt |
| | 0 | 25 | | { |
| | 0 | 26 | | jsonTypeInfo.CreateObjectWithArgs = DefaultJsonTypeInfoResolver.MemberAccessor.CreateImmutableDictionaryCrea |
| | 0 | 27 | | } |
| | | 28 | | } |
| | | 29 | | } |