File: LaunchSettingsSerializerContext.LaunchProfile.g.cs
Project: src\src\Aspire.Hosting.Azure.Functions\Aspire.Hosting.Azure.Functions.csproj (Aspire.Hosting.Azure.Functions)
// <auto-generated/>
 
#nullable enable annotations
#nullable disable warnings
 
// Suppress warnings about [Obsolete] member usage in generated code.
#pragma warning disable CS0612, CS0618
 
namespace Aspire.Hosting
{
    internal sealed partial class LaunchSettingsSerializerContext
    {
        private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Hosting.LaunchProfile>? _LaunchProfile;
        
        /// <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::Aspire.Hosting.LaunchProfile> LaunchProfile
        #nullable enable annotations
        {
            get => _LaunchProfile ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Hosting.LaunchProfile>)Options.GetTypeInfo(typeof(global::Aspire.Hosting.LaunchProfile));
        }
        
        private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Hosting.LaunchProfile> Create_LaunchProfile(global::System.Text.Json.JsonSerializerOptions options)
        {
            if (!TryGetTypeInfoForRuntimeCustomConverter<global::Aspire.Hosting.LaunchProfile>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Hosting.LaunchProfile> jsonTypeInfo))
            {
                var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Aspire.Hosting.LaunchProfile>
                {
                    ObjectCreator = () => new global::Aspire.Hosting.LaunchProfile(),
                    ObjectWithParameterizedConstructorCreator = null,
                    PropertyMetadataInitializer = _ => LaunchProfilePropInit(options),
                    ConstructorParameterMetadataInitializer = null,
                    ConstructorAttributeProviderFactory = static () => typeof(global::Aspire.Hosting.LaunchProfile).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null),
                    SerializeHandler = LaunchProfileSerializeHandler,
                };
                
                jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Aspire.Hosting.LaunchProfile>(options, objectInfo);
                jsonTypeInfo.NumberHandling = null;
            }
        
            jsonTypeInfo.OriginatingResolver = this;
            return jsonTypeInfo;
        }
 
        private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] LaunchProfilePropInit(global::System.Text.Json.JsonSerializerOptions options)
        {
            var properties = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[8];
 
            var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Aspire.Hosting.LaunchProfile),
                Converter = null,
                Getter = static obj => ((global::Aspire.Hosting.LaunchProfile)obj).CommandName,
                Setter = static (obj, value) => ((global::Aspire.Hosting.LaunchProfile)obj).CommandName = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "CommandName",
                JsonPropertyName = "commandName",
                AttributeProviderFactory = static () => typeof(global::Aspire.Hosting.LaunchProfile).GetProperty("CommandName", 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::Aspire.Hosting.LaunchProfile),
                Converter = null,
                Getter = static obj => ((global::Aspire.Hosting.LaunchProfile)obj).CommandLineArgs,
                Setter = static (obj, value) => ((global::Aspire.Hosting.LaunchProfile)obj).CommandLineArgs = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "CommandLineArgs",
                JsonPropertyName = "commandLineArgs",
                AttributeProviderFactory = static () => typeof(global::Aspire.Hosting.LaunchProfile).GetProperty("CommandLineArgs", 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::Aspire.Hosting.LaunchProfile),
                Converter = null,
                Getter = static obj => ((global::Aspire.Hosting.LaunchProfile)obj).ExecutablePath,
                Setter = static (obj, value) => ((global::Aspire.Hosting.LaunchProfile)obj).ExecutablePath = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "ExecutablePath",
                JsonPropertyName = "executablePath",
                AttributeProviderFactory = static () => typeof(global::Aspire.Hosting.LaunchProfile).GetProperty("ExecutablePath", 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);
 
            var info3 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<bool?>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Aspire.Hosting.LaunchProfile),
                Converter = null,
                Getter = static obj => ((global::Aspire.Hosting.LaunchProfile)obj).DotnetRunMessages,
                Setter = static (obj, value) => ((global::Aspire.Hosting.LaunchProfile)obj).DotnetRunMessages = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "DotnetRunMessages",
                JsonPropertyName = "dotnetRunMessages",
                AttributeProviderFactory = static () => typeof(global::Aspire.Hosting.LaunchProfile).GetProperty("DotnetRunMessages", InstanceMemberBindingFlags, null, typeof(bool?), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[3] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<bool?>(options, info3);
 
            var info4 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<bool?>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Aspire.Hosting.LaunchProfile),
                Converter = null,
                Getter = static obj => ((global::Aspire.Hosting.LaunchProfile)obj).LaunchBrowser,
                Setter = static (obj, value) => ((global::Aspire.Hosting.LaunchProfile)obj).LaunchBrowser = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "LaunchBrowser",
                JsonPropertyName = "launchBrowser",
                AttributeProviderFactory = static () => typeof(global::Aspire.Hosting.LaunchProfile).GetProperty("LaunchBrowser", InstanceMemberBindingFlags, null, typeof(bool?), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[4] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<bool?>(options, info4);
 
            var info5 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Aspire.Hosting.LaunchProfile),
                Converter = null,
                Getter = static obj => ((global::Aspire.Hosting.LaunchProfile)obj).LaunchUrl,
                Setter = static (obj, value) => ((global::Aspire.Hosting.LaunchProfile)obj).LaunchUrl = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "LaunchUrl",
                JsonPropertyName = "launchUrl",
                AttributeProviderFactory = static () => typeof(global::Aspire.Hosting.LaunchProfile).GetProperty("LaunchUrl", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[5] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info5);
 
            var info6 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Aspire.Hosting.LaunchProfile),
                Converter = null,
                Getter = static obj => ((global::Aspire.Hosting.LaunchProfile)obj).ApplicationUrl,
                Setter = static (obj, value) => ((global::Aspire.Hosting.LaunchProfile)obj).ApplicationUrl = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "ApplicationUrl",
                JsonPropertyName = "applicationUrl",
                AttributeProviderFactory = static () => typeof(global::Aspire.Hosting.LaunchProfile).GetProperty("ApplicationUrl", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[6] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info6);
 
            var info7 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.Dictionary<string, string>>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Aspire.Hosting.LaunchProfile),
                Converter = null,
                Getter = static obj => ((global::Aspire.Hosting.LaunchProfile)obj).EnvironmentVariables,
                Setter = static (obj, value) => ((global::Aspire.Hosting.LaunchProfile)obj).EnvironmentVariables = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "EnvironmentVariables",
                JsonPropertyName = "environmentVariables",
                AttributeProviderFactory = static () => typeof(global::Aspire.Hosting.LaunchProfile).GetProperty("EnvironmentVariables", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.Dictionary<string, string>), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[7] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.Dictionary<string, string>>(options, info7);
            properties[7].IsGetNullable = false;
            properties[7].IsSetNullable = false;
 
            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 LaunchProfileSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Aspire.Hosting.LaunchProfile? value)
        {
            if (value is null)
            {
                writer.WriteNullValue();
                return;
            }
            
            writer.WriteStartObject();
 
            writer.WriteString(PropName_commandName, ((global::Aspire.Hosting.LaunchProfile)value).CommandName);
            writer.WriteString(PropName_commandLineArgs, ((global::Aspire.Hosting.LaunchProfile)value).CommandLineArgs);
            writer.WriteString(PropName_executablePath, ((global::Aspire.Hosting.LaunchProfile)value).ExecutablePath);
            writer.WritePropertyName(PropName_dotnetRunMessages);
            global::System.Text.Json.JsonSerializer.Serialize(writer, ((global::Aspire.Hosting.LaunchProfile)value).DotnetRunMessages, NullableBoolean);
            writer.WritePropertyName(PropName_launchBrowser);
            global::System.Text.Json.JsonSerializer.Serialize(writer, ((global::Aspire.Hosting.LaunchProfile)value).LaunchBrowser, NullableBoolean);
            writer.WriteString(PropName_launchUrl, ((global::Aspire.Hosting.LaunchProfile)value).LaunchUrl);
            writer.WriteString(PropName_applicationUrl, ((global::Aspire.Hosting.LaunchProfile)value).ApplicationUrl);
            writer.WritePropertyName(PropName_environmentVariables);
            DictionaryStringStringSerializeHandler(writer, ((global::Aspire.Hosting.LaunchProfile)value).EnvironmentVariables);
 
            writer.WriteEndObject();
        }
    }
}