ImmutableEnumerableOfTConverterWithReflection<TCollection, TElement>
using System.
Collections.
Generic;
using System.
Diagnostics.
CodeAnalysis;
using System.
Text.
Json.
Serialization.
Metadata;
namespace System.
Text.
Json.
Serialization.
Converters
{
internal sealed class ImmutableEnumerableOfTConverterWithReflection<
TCollection,
TElement> :
ImmutableEnumerableOfTConverter<
TCollection,
TElement>
where TCollection :
IEnumerable<
TElement>
{
[
RequiresUnreferencedCode(
"System.Collections.Immutable converters use Reflection to find and create Immutable Collection types, which requires unreferenced code.")]
[
RequiresDynamicCode(
"System.Collections.Immutable converters use Reflection to find and create Immutable Collection types, which requires unreferenced code.")]
public ImmutableEnumerableOfTConverterWithReflection()
{
}
[
RequiresUnreferencedCode(
"System.Collections.Immutable converters use Reflection to find and create Immutable Collection types, which requires unreferenced code.")]
[
RequiresDynamicCode(
"System.Collections.Immutable converters use Reflection to find and create Immutable Collection types, which requires unreferenced code.")]
internal override void ConfigureJsonTypeInfoUsingReflection(
JsonTypeInfo jsonTypeInfo,
JsonSerializerOptions options)
{
jsonTypeInfo.
CreateObjectWithArgs =
DefaultJsonTypeInfoResolver.
MemberAccessor.
CreateImmutableEnumerableCreateRangeDelegate<
TCollection,
TElement>();
}
}
}