usingSystem.Collections;
usingSystem.Diagnostics.CodeAnalysis;
usingSystem.Text.Json.Serialization.Metadata;
namespaceSystem.Text.Json.Serialization.Converters
{
internalsealedclassStackOrQueueConverterWithReflection<TCollection> : StackOrQueueConverter<TCollection> whereTCollection : IEnumerable
{
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
publicStackOrQueueConverterWithReflection()
{
}
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
internaloverridevoidConfigureJsonTypeInfoUsingReflection(JsonTypeInfojsonTypeInfo, JsonSerializerOptionsoptions)
{
jsonTypeInfo.AddMethodDelegate = options.MemberAccessorStrategy.CreateAddMethodDelegate<TCollection>();
}
}
}