File: _generated\2\LaunchProfileJsonSerializerContext.ProjectLaunchProfile.g.cs
Web Access
Project: src\src\sdk\src\Microsoft.DotNet.ProjectTools\Microsoft.DotNet.ProjectTools.csproj (Microsoft.DotNet.ProjectTools)
// <auto-generated/>

#nullable enable annotations
#nullable disable warnings

// Suppress warnings about [Obsolete] member usage in generated code.
#pragma warning disable CS0612, CS0618

namespace Microsoft.DotNet.ProjectTools
{
    internal partial class LaunchProfileJsonSerializerContext
    {
        private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.DotNet.ProjectTools.ProjectLaunchProfile>? _ProjectLaunchProfile;
        
        /// <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.DotNet.ProjectTools.ProjectLaunchProfile> ProjectLaunchProfile
        #nullable enable annotations
        {
            get => _ProjectLaunchProfile ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.DotNet.ProjectTools.ProjectLaunchProfile>)Options.GetTypeInfo(typeof(global::Microsoft.DotNet.ProjectTools.ProjectLaunchProfile));
        }
        
        private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.DotNet.ProjectTools.ProjectLaunchProfile> Create_ProjectLaunchProfile(global::System.Text.Json.JsonSerializerOptions options)
        {
            if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.DotNet.ProjectTools.ProjectLaunchProfile>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.DotNet.ProjectTools.ProjectLaunchProfile> jsonTypeInfo))
            {
                var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.DotNet.ProjectTools.ProjectLaunchProfile>
                {
                    ObjectCreator = () => new global::Microsoft.DotNet.ProjectTools.ProjectLaunchProfile(),
                    ObjectWithParameterizedConstructorCreator = null,
                    PropertyMetadataInitializer = _ => ProjectLaunchProfilePropInit(options),
                    ConstructorParameterMetadataInitializer = null,
                    ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.ProjectTools.ProjectLaunchProfile).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null),
                    SerializeHandler = ProjectLaunchProfileSerializeHandler,
                };
                
                jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.DotNet.ProjectTools.ProjectLaunchProfile>(options, objectInfo);
                jsonTypeInfo.NumberHandling = null;
            }
        
            jsonTypeInfo.OriginatingResolver = this;
            return jsonTypeInfo;
        }

        private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] ProjectLaunchProfilePropInit(global::System.Text.Json.JsonSerializerOptions options)
        {
            var properties = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[7];

            var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<bool>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.DotNet.ProjectTools.ProjectLaunchProfile),
                Converter = null,
                Getter = static obj => ((global::Microsoft.DotNet.ProjectTools.ProjectLaunchProfile)obj).LaunchBrowser,
                Setter = static (obj, value) => __set_ProjectLaunchProfile_LaunchBrowser((global::Microsoft.DotNet.ProjectTools.ProjectLaunchProfile)obj, value!),
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "LaunchBrowser",
                JsonPropertyName = "launchBrowser",
                AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.ProjectTools.ProjectLaunchProfile).GetProperty("LaunchBrowser", InstanceMemberBindingFlags, null, typeof(bool), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<bool>(options, info0);

            var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.DotNet.ProjectTools.ProjectLaunchProfile),
                Converter = null,
                Getter = static obj => ((global::Microsoft.DotNet.ProjectTools.ProjectLaunchProfile)obj).LaunchUrl,
                Setter = static (obj, value) => __set_ProjectLaunchProfile_LaunchUrl((global::Microsoft.DotNet.ProjectTools.ProjectLaunchProfile)obj, value!),
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "LaunchUrl",
                JsonPropertyName = "launchUrl",
                AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.ProjectTools.ProjectLaunchProfile).GetProperty("LaunchUrl", 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.DotNet.ProjectTools.ProjectLaunchProfile),
                Converter = null,
                Getter = static obj => ((global::Microsoft.DotNet.ProjectTools.ProjectLaunchProfile)obj).ApplicationUrl,
                Setter = static (obj, value) => __set_ProjectLaunchProfile_ApplicationUrl((global::Microsoft.DotNet.ProjectTools.ProjectLaunchProfile)obj, value!),
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "ApplicationUrl",
                JsonPropertyName = "applicationUrl",
                AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.ProjectTools.ProjectLaunchProfile).GetProperty("ApplicationUrl", 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<string>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.DotNet.ProjectTools.LaunchProfile),
                Converter = null,
                Getter = null,
                Setter = null,
                IgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.Always,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "LaunchProfileName",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.ProjectTools.LaunchProfile).GetProperty("LaunchProfileName", 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<bool>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.DotNet.ProjectTools.LaunchProfile),
                Converter = null,
                Getter = static obj => ((global::Microsoft.DotNet.ProjectTools.LaunchProfile)obj).DotNetRunMessages,
                Setter = static (obj, value) => __set_ProjectLaunchProfile_DotNetRunMessages((global::Microsoft.DotNet.ProjectTools.LaunchProfile)obj, value!),
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "DotNetRunMessages",
                JsonPropertyName = "dotnetRunMessages",
                AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.ProjectTools.LaunchProfile).GetProperty("DotNetRunMessages", 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::Microsoft.DotNet.ProjectTools.LaunchProfile),
                Converter = null,
                Getter = static obj => ((global::Microsoft.DotNet.ProjectTools.LaunchProfile)obj).CommandLineArgs,
                Setter = static (obj, value) => __set_ProjectLaunchProfile_CommandLineArgs((global::Microsoft.DotNet.ProjectTools.LaunchProfile)obj, value!),
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "CommandLineArgs",
                JsonPropertyName = "commandLineArgs",
                AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.ProjectTools.LaunchProfile).GetProperty("CommandLineArgs", 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<global::System.Collections.Immutable.ImmutableDictionary<string, string>>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.DotNet.ProjectTools.LaunchProfile),
                Converter = null,
                Getter = static obj => ((global::Microsoft.DotNet.ProjectTools.LaunchProfile)obj).EnvironmentVariables,
                Setter = static (obj, value) => __set_ProjectLaunchProfile_EnvironmentVariables((global::Microsoft.DotNet.ProjectTools.LaunchProfile)obj, value!),
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "EnvironmentVariables",
                JsonPropertyName = "environmentVariables",
                AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.ProjectTools.LaunchProfile).GetProperty("EnvironmentVariables", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Immutable.ImmutableDictionary<string, string>), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[6] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Immutable.ImmutableDictionary<string, string>>(options, info6);
            properties[6].IsGetNullable = false;
            properties[6].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 ProjectLaunchProfileSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.DotNet.ProjectTools.ProjectLaunchProfile? value)
        {
            if (value is null)
            {
                writer.WriteNullValue();
                return;
            }
            
            writer.WriteStartObject();

            writer.WriteBoolean(PropName_launchBrowser, ((global::Microsoft.DotNet.ProjectTools.ProjectLaunchProfile)value).LaunchBrowser);
            writer.WriteString(PropName_launchUrl, ((global::Microsoft.DotNet.ProjectTools.ProjectLaunchProfile)value).LaunchUrl);
            writer.WriteString(PropName_applicationUrl, ((global::Microsoft.DotNet.ProjectTools.ProjectLaunchProfile)value).ApplicationUrl);
            writer.WriteBoolean(PropName_dotnetRunMessages, ((global::Microsoft.DotNet.ProjectTools.LaunchProfile)value).DotNetRunMessages);
            writer.WriteString(PropName_commandLineArgs, ((global::Microsoft.DotNet.ProjectTools.LaunchProfile)value).CommandLineArgs);
            writer.WritePropertyName(PropName_environmentVariables);
            ImmutableDictionaryStringStringSerializeHandler(writer, ((global::Microsoft.DotNet.ProjectTools.LaunchProfile)value).EnvironmentVariables);

            writer.WriteEndObject();
        }

        [global::System.Runtime.CompilerServices.UnsafeAccessorAttribute(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Method, Name = "set_LaunchBrowser")]
        private static extern void __set_ProjectLaunchProfile_LaunchBrowser(global::Microsoft.DotNet.ProjectTools.ProjectLaunchProfile obj, bool value);
        [global::System.Runtime.CompilerServices.UnsafeAccessorAttribute(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Method, Name = "set_LaunchUrl")]
        private static extern void __set_ProjectLaunchProfile_LaunchUrl(global::Microsoft.DotNet.ProjectTools.ProjectLaunchProfile obj, string value);
        [global::System.Runtime.CompilerServices.UnsafeAccessorAttribute(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Method, Name = "set_ApplicationUrl")]
        private static extern void __set_ProjectLaunchProfile_ApplicationUrl(global::Microsoft.DotNet.ProjectTools.ProjectLaunchProfile obj, string value);
        [global::System.Runtime.CompilerServices.UnsafeAccessorAttribute(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Method, Name = "set_DotNetRunMessages")]
        private static extern void __set_ProjectLaunchProfile_DotNetRunMessages(global::Microsoft.DotNet.ProjectTools.LaunchProfile obj, bool value);
        [global::System.Runtime.CompilerServices.UnsafeAccessorAttribute(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Method, Name = "set_CommandLineArgs")]
        private static extern void __set_ProjectLaunchProfile_CommandLineArgs(global::Microsoft.DotNet.ProjectTools.LaunchProfile obj, string value);
        [global::System.Runtime.CompilerServices.UnsafeAccessorAttribute(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Method, Name = "set_EnvironmentVariables")]
        private static extern void __set_ProjectLaunchProfile_EnvironmentVariables(global::Microsoft.DotNet.ProjectTools.LaunchProfile obj, global::System.Collections.Immutable.ImmutableDictionary<string, string> value);
    }
}