File: IdentityEndpointsJsonSerializerContext.InfoRequest.g.cs
Project: src\src\Identity\Core\src\Microsoft.AspNetCore.Identity.csproj (Microsoft.AspNetCore.Identity)
// <auto-generated/>
 
#nullable enable annotations
#nullable disable warnings
 
// Suppress warnings about [Obsolete] member usage in generated code.
#pragma warning disable CS0612, CS0618
 
namespace Microsoft.AspNetCore.Identity.Data
{
    internal sealed partial class IdentityEndpointsJsonSerializerContext
    {
        private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Identity.Data.InfoRequest>? _InfoRequest;
        
        /// <summary>
        /// Defines the source generated JSON serialization contract metadata for a given type.
        /// </summary>
        #nullable disable annotations // Marking the property type as nullable-oblivious.
        public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Identity.Data.InfoRequest> InfoRequest
        #nullable enable annotations
        {
            get => _InfoRequest ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Identity.Data.InfoRequest>)Options.GetTypeInfo(typeof(global::Microsoft.AspNetCore.Identity.Data.InfoRequest));
        }
        
        private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Identity.Data.InfoRequest> Create_InfoRequest(global::System.Text.Json.JsonSerializerOptions options)
        {
            if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.AspNetCore.Identity.Data.InfoRequest>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Identity.Data.InfoRequest> jsonTypeInfo))
            {
                var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.AspNetCore.Identity.Data.InfoRequest>
                {
                    ObjectCreator = null,
                    ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.AspNetCore.Identity.Data.InfoRequest(){ NewEmail = (string)args[0], NewPassword = (string)args[1], OldPassword = (string)args[2] },
                    PropertyMetadataInitializer = _ => InfoRequestPropInit(options),
                    ConstructorParameterMetadataInitializer = InfoRequestCtorParamInit,
                    ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Identity.Data.InfoRequest).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null),
                    SerializeHandler = InfoRequestSerializeHandler,
                };
                
                jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.AspNetCore.Identity.Data.InfoRequest>(options, objectInfo);
                jsonTypeInfo.NumberHandling = null;
            }
        
            jsonTypeInfo.OriginatingResolver = this;
            return jsonTypeInfo;
        }
 
        private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] InfoRequestPropInit(global::System.Text.Json.JsonSerializerOptions options)
        {
            var properties = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[3];
 
            var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.AspNetCore.Identity.Data.InfoRequest),
                Converter = null,
                Getter = static obj => ((global::Microsoft.AspNetCore.Identity.Data.InfoRequest)obj).NewEmail,
                Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."),
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "NewEmail",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Identity.Data.InfoRequest).GetProperty("NewEmail", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info0);
 
            var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.AspNetCore.Identity.Data.InfoRequest),
                Converter = null,
                Getter = static obj => ((global::Microsoft.AspNetCore.Identity.Data.InfoRequest)obj).NewPassword,
                Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."),
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "NewPassword",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Identity.Data.InfoRequest).GetProperty("NewPassword", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info1);
 
            var info2 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.AspNetCore.Identity.Data.InfoRequest),
                Converter = null,
                Getter = static obj => ((global::Microsoft.AspNetCore.Identity.Data.InfoRequest)obj).OldPassword,
                Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."),
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "OldPassword",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Identity.Data.InfoRequest).GetProperty("OldPassword", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[2] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info2);
 
            return properties;
        }
 
        // Intentionally not a static method because we create a delegate to it. Invoking delegates to instance
        // methods is almost as fast as virtual calls. Static methods need to go through a shuffle thunk.
        private void InfoRequestSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.AspNetCore.Identity.Data.InfoRequest? value)
        {
            if (value is null)
            {
                writer.WriteNullValue();
                return;
            }
            
            writer.WriteStartObject();
 
            writer.WriteString(PropName_NewEmail, ((global::Microsoft.AspNetCore.Identity.Data.InfoRequest)value).NewEmail);
            writer.WriteString(PropName_NewPassword, ((global::Microsoft.AspNetCore.Identity.Data.InfoRequest)value).NewPassword);
            writer.WriteString(PropName_OldPassword, ((global::Microsoft.AspNetCore.Identity.Data.InfoRequest)value).OldPassword);
 
            writer.WriteEndObject();
        }
 
        private static global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[] InfoRequestCtorParamInit() => new global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[]
        {
            new()
            {
                Name = "NewEmail",
                ParameterType = typeof(string),
                Position = 0,
                IsNullable = true,
                IsMemberInitializer = true,
            },
 
            new()
            {
                Name = "NewPassword",
                ParameterType = typeof(string),
                Position = 1,
                IsNullable = true,
                IsMemberInitializer = true,
            },
 
            new()
            {
                Name = "OldPassword",
                ParameterType = typeof(string),
                Position = 2,
                IsNullable = true,
                IsMemberInitializer = true,
            },
        };
    }
}