File: ImportMapSerializerContext.ImportMapDefinition.g.cs
Project: src\src\Components\Endpoints\src\Microsoft.AspNetCore.Components.Endpoints.csproj (Microsoft.AspNetCore.Components.Endpoints)
// <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.Components
{
    internal partial class ImportMapSerializerContext
    {
        private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Components.ImportMapDefinition>? _ImportMapDefinition;
        
        /// <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.Components.ImportMapDefinition> ImportMapDefinition
        #nullable enable annotations
        {
            get => _ImportMapDefinition ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Components.ImportMapDefinition>)Options.GetTypeInfo(typeof(global::Microsoft.AspNetCore.Components.ImportMapDefinition));
        }
        
        private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Components.ImportMapDefinition> Create_ImportMapDefinition(global::System.Text.Json.JsonSerializerOptions options)
        {
            if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.AspNetCore.Components.ImportMapDefinition>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Components.ImportMapDefinition> jsonTypeInfo))
            {
                var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.AspNetCore.Components.ImportMapDefinition>
                {
                    ObjectCreator = null,
                    ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.AspNetCore.Components.ImportMapDefinition((global::System.Collections.Generic.IReadOnlyDictionary<string, string>)args[0], (global::System.Collections.Generic.IReadOnlyDictionary<string, global::System.Collections.Generic.IReadOnlyDictionary<string, string>>)args[1], (global::System.Collections.Generic.IReadOnlyDictionary<string, string>)args[2]),
                    PropertyMetadataInitializer = _ => ImportMapDefinitionPropInit(options),
                    ConstructorParameterMetadataInitializer = ImportMapDefinitionCtorParamInit,
                    ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Components.ImportMapDefinition).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(global::System.Collections.Generic.IReadOnlyDictionary<string, string>), typeof(global::System.Collections.Generic.IReadOnlyDictionary<string, global::System.Collections.Generic.IReadOnlyDictionary<string, string>>), typeof(global::System.Collections.Generic.IReadOnlyDictionary<string, string>)}, modifiers: null),
                    SerializeHandler = ImportMapDefinitionSerializeHandler,
                };
                
                jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.AspNetCore.Components.ImportMapDefinition>(options, objectInfo);
                jsonTypeInfo.NumberHandling = null;
            }
        
            jsonTypeInfo.OriginatingResolver = this;
            return jsonTypeInfo;
        }
 
        private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] ImportMapDefinitionPropInit(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<global::System.Collections.Generic.IReadOnlyDictionary<string, string>>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.AspNetCore.Components.ImportMapDefinition),
                Converter = null,
                Getter = static obj => ((global::Microsoft.AspNetCore.Components.ImportMapDefinition)obj).Imports,
                Setter = null,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Imports",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Components.ImportMapDefinition).GetProperty("Imports", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IReadOnlyDictionary<string, string>), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.IReadOnlyDictionary<string, string>>(options, info0);
 
            var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.IReadOnlyDictionary<string, global::System.Collections.Generic.IReadOnlyDictionary<string, string>>>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.AspNetCore.Components.ImportMapDefinition),
                Converter = null,
                Getter = static obj => ((global::Microsoft.AspNetCore.Components.ImportMapDefinition)obj).Scopes,
                Setter = null,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Scopes",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Components.ImportMapDefinition).GetProperty("Scopes", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IReadOnlyDictionary<string, global::System.Collections.Generic.IReadOnlyDictionary<string, string>>), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.IReadOnlyDictionary<string, global::System.Collections.Generic.IReadOnlyDictionary<string, string>>>(options, info1);
 
            var info2 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.IReadOnlyDictionary<string, string>>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.AspNetCore.Components.ImportMapDefinition),
                Converter = null,
                Getter = static obj => ((global::Microsoft.AspNetCore.Components.ImportMapDefinition)obj).Integrity,
                Setter = null,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Integrity",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Components.ImportMapDefinition).GetProperty("Integrity", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IReadOnlyDictionary<string, string>), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[2] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.IReadOnlyDictionary<string, 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 ImportMapDefinitionSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.AspNetCore.Components.ImportMapDefinition? value)
        {
            if (value is null)
            {
                writer.WriteNullValue();
                return;
            }
            
            writer.WriteStartObject();
 
            writer.WritePropertyName(PropName_Imports);
            IReadOnlyDictionaryStringStringSerializeHandler(writer, ((global::Microsoft.AspNetCore.Components.ImportMapDefinition)value).Imports);
            writer.WritePropertyName(PropName_Scopes);
            IReadOnlyDictionaryStringIReadOnlyDictionaryStringStringSerializeHandler(writer, ((global::Microsoft.AspNetCore.Components.ImportMapDefinition)value).Scopes);
            writer.WritePropertyName(PropName_Integrity);
            IReadOnlyDictionaryStringStringSerializeHandler(writer, ((global::Microsoft.AspNetCore.Components.ImportMapDefinition)value).Integrity);
 
            writer.WriteEndObject();
        }
 
        private static global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[] ImportMapDefinitionCtorParamInit() => new global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[]
        {
            new()
            {
                Name = "imports",
                ParameterType = typeof(global::System.Collections.Generic.IReadOnlyDictionary<string, string>),
                Position = 0,
                HasDefaultValue = false,
                DefaultValue = null,
                IsNullable = true,
            },
 
            new()
            {
                Name = "scopes",
                ParameterType = typeof(global::System.Collections.Generic.IReadOnlyDictionary<string, global::System.Collections.Generic.IReadOnlyDictionary<string, string>>),
                Position = 1,
                HasDefaultValue = false,
                DefaultValue = null,
                IsNullable = true,
            },
 
            new()
            {
                Name = "integrity",
                ParameterType = typeof(global::System.Collections.Generic.IReadOnlyDictionary<string, string>),
                Position = 2,
                HasDefaultValue = false,
                DefaultValue = null,
                IsNullable = true,
            },
        };
    }
}