File: ExtensionsExceptionJsonContext.ExceptionExtensionData.g.cs
Project: src\src\Middleware\Diagnostics\src\Microsoft.AspNetCore.Diagnostics.csproj (Microsoft.AspNetCore.Diagnostics)
// <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.Diagnostics
{
    internal sealed partial class ExtensionsExceptionJsonContext
    {
        private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Diagnostics.ExceptionExtensionData>? _ExceptionExtensionData;
        
        /// <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.Diagnostics.ExceptionExtensionData> ExceptionExtensionData
        #nullable enable annotations
        {
            get => _ExceptionExtensionData ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Diagnostics.ExceptionExtensionData>)Options.GetTypeInfo(typeof(global::Microsoft.AspNetCore.Diagnostics.ExceptionExtensionData));
        }
        
        private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Diagnostics.ExceptionExtensionData> Create_ExceptionExtensionData(global::System.Text.Json.JsonSerializerOptions options)
        {
            if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.AspNetCore.Diagnostics.ExceptionExtensionData>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Diagnostics.ExceptionExtensionData> jsonTypeInfo))
            {
                var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.AspNetCore.Diagnostics.ExceptionExtensionData>
                {
                    ObjectCreator = null,
                    ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.AspNetCore.Diagnostics.ExceptionExtensionData((string)args[0], (global::Microsoft.AspNetCore.Http.IHeaderDictionary)args[1], (string)args[2], (string)args[3], (global::Microsoft.AspNetCore.Routing.RouteValueDictionary)args[4]),
                    PropertyMetadataInitializer = _ => ExceptionExtensionDataPropInit(options),
                    ConstructorParameterMetadataInitializer = ExceptionExtensionDataCtorParamInit,
                    ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Diagnostics.ExceptionExtensionData).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(string), typeof(global::Microsoft.AspNetCore.Http.IHeaderDictionary), typeof(string), typeof(string), typeof(global::Microsoft.AspNetCore.Routing.RouteValueDictionary)}, modifiers: null),
                    SerializeHandler = ExceptionExtensionDataSerializeHandler,
                };
                
                jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.AspNetCore.Diagnostics.ExceptionExtensionData>(options, objectInfo);
                jsonTypeInfo.NumberHandling = null;
            }
        
            jsonTypeInfo.OriginatingResolver = this;
            return jsonTypeInfo;
        }
 
        private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] ExceptionExtensionDataPropInit(global::System.Text.Json.JsonSerializerOptions options)
        {
            var properties = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[5];
 
            var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.AspNetCore.Diagnostics.ExceptionExtensionData),
                Converter = null,
                Getter = static obj => ((global::Microsoft.AspNetCore.Diagnostics.ExceptionExtensionData)obj).Details,
                Setter = null,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Details",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Diagnostics.ExceptionExtensionData).GetProperty("Details", 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);
            properties[0].IsGetNullable = false;
 
            var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Microsoft.AspNetCore.Http.IHeaderDictionary>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.AspNetCore.Diagnostics.ExceptionExtensionData),
                Converter = null,
                Getter = static obj => ((global::Microsoft.AspNetCore.Diagnostics.ExceptionExtensionData)obj).Headers,
                Setter = null,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Headers",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Diagnostics.ExceptionExtensionData).GetProperty("Headers", InstanceMemberBindingFlags, null, typeof(global::Microsoft.AspNetCore.Http.IHeaderDictionary), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Microsoft.AspNetCore.Http.IHeaderDictionary>(options, info1);
            properties[1].IsGetNullable = false;
 
            var info2 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.AspNetCore.Diagnostics.ExceptionExtensionData),
                Converter = null,
                Getter = static obj => ((global::Microsoft.AspNetCore.Diagnostics.ExceptionExtensionData)obj).Path,
                Setter = null,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Path",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Diagnostics.ExceptionExtensionData).GetProperty("Path", 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);
            properties[2].IsGetNullable = false;
 
            var info3 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.AspNetCore.Diagnostics.ExceptionExtensionData),
                Converter = null,
                Getter = static obj => ((global::Microsoft.AspNetCore.Diagnostics.ExceptionExtensionData)obj).Endpoint,
                Setter = null,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Endpoint",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Diagnostics.ExceptionExtensionData).GetProperty("Endpoint", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[3] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info3);
 
            var info4 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Microsoft.AspNetCore.Routing.RouteValueDictionary>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.AspNetCore.Diagnostics.ExceptionExtensionData),
                Converter = null,
                Getter = static obj => ((global::Microsoft.AspNetCore.Diagnostics.ExceptionExtensionData)obj).RouteValues,
                Setter = null,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "RouteValues",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Diagnostics.ExceptionExtensionData).GetProperty("RouteValues", InstanceMemberBindingFlags, null, typeof(global::Microsoft.AspNetCore.Routing.RouteValueDictionary), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[4] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Microsoft.AspNetCore.Routing.RouteValueDictionary>(options, info4);
 
            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 ExceptionExtensionDataSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.AspNetCore.Diagnostics.ExceptionExtensionData? value)
        {
            if (value is null)
            {
                writer.WriteNullValue();
                return;
            }
            
            writer.WriteStartObject();
 
            writer.WriteString(PropName_Details, ((global::Microsoft.AspNetCore.Diagnostics.ExceptionExtensionData)value).Details);
            writer.WritePropertyName(PropName_Headers);
            IHeaderDictionarySerializeHandler(writer, ((global::Microsoft.AspNetCore.Diagnostics.ExceptionExtensionData)value).Headers);
            writer.WriteString(PropName_Path, ((global::Microsoft.AspNetCore.Diagnostics.ExceptionExtensionData)value).Path);
            writer.WriteString(PropName_Endpoint, ((global::Microsoft.AspNetCore.Diagnostics.ExceptionExtensionData)value).Endpoint);
            writer.WritePropertyName(PropName_RouteValues);
            global::System.Text.Json.JsonSerializer.Serialize(writer, ((global::Microsoft.AspNetCore.Diagnostics.ExceptionExtensionData)value).RouteValues, RouteValueDictionary);
 
            writer.WriteEndObject();
        }
 
        private static global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[] ExceptionExtensionDataCtorParamInit() => new global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[]
        {
            new()
            {
                Name = "details",
                ParameterType = typeof(string),
                Position = 0,
                HasDefaultValue = false,
                DefaultValue = null,
                IsNullable = false,
            },
 
            new()
            {
                Name = "headers",
                ParameterType = typeof(global::Microsoft.AspNetCore.Http.IHeaderDictionary),
                Position = 1,
                HasDefaultValue = false,
                DefaultValue = null,
                IsNullable = false,
            },
 
            new()
            {
                Name = "path",
                ParameterType = typeof(string),
                Position = 2,
                HasDefaultValue = false,
                DefaultValue = null,
                IsNullable = false,
            },
 
            new()
            {
                Name = "endpoint",
                ParameterType = typeof(string),
                Position = 3,
                HasDefaultValue = false,
                DefaultValue = null,
                IsNullable = true,
            },
 
            new()
            {
                Name = "routeValues",
                ParameterType = typeof(global::Microsoft.AspNetCore.Routing.RouteValueDictionary),
                Position = 4,
                HasDefaultValue = false,
                DefaultValue = null,
                IsNullable = true,
            },
        };
    }
}