File: _generated\1\PackageSearchJsonContext.PackageSearchProblem.g.cs
Web Access
Project: src\src\nuget-client\src\NuGet.Core\NuGet.CommandLine.XPlat\NuGet.CommandLine.XPlat.csproj (NuGet.CommandLine.XPlat)
// <auto-generated/>

#nullable enable annotations
#nullable disable warnings

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

namespace NuGet.CommandLine.XPlat
{
    internal partial class PackageSearchJsonContext
    {
        private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.CommandLine.XPlat.PackageSearchProblem>? _PackageSearchProblem;
        
        /// <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::NuGet.CommandLine.XPlat.PackageSearchProblem> PackageSearchProblem
        #nullable enable annotations
        {
            get => _PackageSearchProblem ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.CommandLine.XPlat.PackageSearchProblem>)Options.GetTypeInfo(typeof(global::NuGet.CommandLine.XPlat.PackageSearchProblem));
        }
        
        private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.CommandLine.XPlat.PackageSearchProblem> Create_PackageSearchProblem(global::System.Text.Json.JsonSerializerOptions options)
        {
            if (!TryGetTypeInfoForRuntimeCustomConverter<global::NuGet.CommandLine.XPlat.PackageSearchProblem>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.CommandLine.XPlat.PackageSearchProblem> jsonTypeInfo))
            {
                var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::NuGet.CommandLine.XPlat.PackageSearchProblem>
                {
                    ObjectCreator = null,
                    ObjectWithParameterizedConstructorCreator = static args => new global::NuGet.CommandLine.XPlat.PackageSearchProblem((string)args[0], (global::NuGet.CommandLine.XPlat.PackageSearchProblemType)args[1]),
                    PropertyMetadataInitializer = _ => PackageSearchProblemPropInit(options),
                    ConstructorParameterMetadataInitializer = PackageSearchProblemCtorParamInit,
                    ConstructorAttributeProviderFactory = static () => typeof(global::NuGet.CommandLine.XPlat.PackageSearchProblem).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(string), typeof(global::NuGet.CommandLine.XPlat.PackageSearchProblemType)}, modifiers: null),
                    SerializeHandler = null,
                };
                
                jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::NuGet.CommandLine.XPlat.PackageSearchProblem>(options, objectInfo);
                jsonTypeInfo.NumberHandling = null;
            }
        
            jsonTypeInfo.OriginatingResolver = this;
            return jsonTypeInfo;
        }

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

            var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::NuGet.CommandLine.XPlat.PackageSearchProblem),
                Converter = null,
                Getter = static obj => ((global::NuGet.CommandLine.XPlat.PackageSearchProblem)obj).Text,
                Setter = null,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Text",
                JsonPropertyName = "text",
                AttributeProviderFactory = static () => typeof(global::NuGet.CommandLine.XPlat.PackageSearchProblem).GetProperty("Text", 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;
            properties[0].IsSetNullable = false;

            var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::NuGet.CommandLine.XPlat.PackageSearchProblemType>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::NuGet.CommandLine.XPlat.PackageSearchProblem),
                Converter = (global::System.Text.Json.Serialization.JsonConverter<global::NuGet.CommandLine.XPlat.PackageSearchProblemType>)ExpandConverter(typeof(global::NuGet.CommandLine.XPlat.PackageSearchProblemType), new global::System.Text.Json.Serialization.JsonStringEnumConverter<global::NuGet.CommandLine.XPlat.PackageSearchProblemType>(), options),
                Getter = static obj => ((global::NuGet.CommandLine.XPlat.PackageSearchProblem)obj).ProblemType,
                Setter = null,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "ProblemType",
                JsonPropertyName = "problemType",
                AttributeProviderFactory = static () => typeof(global::NuGet.CommandLine.XPlat.PackageSearchProblem).GetProperty("ProblemType", InstanceMemberBindingFlags, null, typeof(global::NuGet.CommandLine.XPlat.PackageSearchProblemType), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::NuGet.CommandLine.XPlat.PackageSearchProblemType>(options, info1);

            return properties;
        }

        private static global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[] PackageSearchProblemCtorParamInit() => new global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[]
        {
            new()
            {
                Name = "text",
                ParameterType = typeof(string),
                Position = 0,
                HasDefaultValue = false,
                DefaultValue = null,
                IsNullable = false,
            },

            new()
            {
                Name = "problemType",
                ParameterType = typeof(global::NuGet.CommandLine.XPlat.PackageSearchProblemType),
                Position = 1,
                HasDefaultValue = false,
                DefaultValue = null,
                IsNullable = false,
            },
        };
    }
}