File: _generated\5\CacheFileSourceGen.IAssetsLogMessage.g.cs
Web Access
Project: src\src\nuget-client\src\NuGet.Core\NuGet.ProjectModel\NuGet.ProjectModel.csproj (NuGet.ProjectModel)
// <auto-generated/>

#nullable enable annotations
#nullable disable warnings

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

namespace NuGet.ProjectModel
{
    public static partial class CacheFileFormat
    {
        private sealed partial class CacheFileSourceGen
        {
            private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.ProjectModel.IAssetsLogMessage>? _IAssetsLogMessage;
            
            /// <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.ProjectModel.IAssetsLogMessage> IAssetsLogMessage
            #nullable enable annotations
            {
                get => _IAssetsLogMessage ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.ProjectModel.IAssetsLogMessage>)Options.GetTypeInfo(typeof(global::NuGet.ProjectModel.IAssetsLogMessage));
            }
            
            private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.ProjectModel.IAssetsLogMessage> Create_IAssetsLogMessage(global::System.Text.Json.JsonSerializerOptions options)
            {
                if (!TryGetTypeInfoForRuntimeCustomConverter<global::NuGet.ProjectModel.IAssetsLogMessage>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.ProjectModel.IAssetsLogMessage> jsonTypeInfo))
                {
                    var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::NuGet.ProjectModel.IAssetsLogMessage>
                    {
                        ObjectCreator = null,
                        ObjectWithParameterizedConstructorCreator = null,
                        PropertyMetadataInitializer = _ => IAssetsLogMessagePropInit(options),
                        ConstructorParameterMetadataInitializer = null,
                        ConstructorAttributeProviderFactory = null,
                        SerializeHandler = IAssetsLogMessageSerializeHandler,
                    };
                    
                    jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::NuGet.ProjectModel.IAssetsLogMessage>(options, objectInfo);
                    jsonTypeInfo.NumberHandling = null;
                }
            
                jsonTypeInfo.OriginatingResolver = this;
                return jsonTypeInfo;
            }

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

                var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::NuGet.Common.LogLevel>
                {
                    IsProperty = true,
                    IsPublic = true,
                    IsVirtual = true,
                    DeclaringType = typeof(global::NuGet.ProjectModel.IAssetsLogMessage),
                    Converter = null,
                    Getter = static obj => ((global::NuGet.ProjectModel.IAssetsLogMessage)obj).Level,
                    Setter = null,
                    IgnoreCondition = null,
                    HasJsonInclude = false,
                    IsExtensionData = false,
                    NumberHandling = null,
                    PropertyName = "Level",
                    JsonPropertyName = null,
                    AttributeProviderFactory = static () => typeof(global::NuGet.ProjectModel.IAssetsLogMessage).GetProperty("Level", InstanceMemberBindingFlags, null, typeof(global::NuGet.Common.LogLevel), global::System.Array.Empty<global::System.Type>(), null),
                };
                
                properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::NuGet.Common.LogLevel>(options, info0);

                var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::NuGet.Common.NuGetLogCode>
                {
                    IsProperty = true,
                    IsPublic = true,
                    IsVirtual = true,
                    DeclaringType = typeof(global::NuGet.ProjectModel.IAssetsLogMessage),
                    Converter = null,
                    Getter = static obj => ((global::NuGet.ProjectModel.IAssetsLogMessage)obj).Code,
                    Setter = null,
                    IgnoreCondition = null,
                    HasJsonInclude = false,
                    IsExtensionData = false,
                    NumberHandling = null,
                    PropertyName = "Code",
                    JsonPropertyName = null,
                    AttributeProviderFactory = static () => typeof(global::NuGet.ProjectModel.IAssetsLogMessage).GetProperty("Code", InstanceMemberBindingFlags, null, typeof(global::NuGet.Common.NuGetLogCode), global::System.Array.Empty<global::System.Type>(), null),
                };
                
                properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::NuGet.Common.NuGetLogCode>(options, info1);

                var info2 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
                {
                    IsProperty = true,
                    IsPublic = true,
                    IsVirtual = true,
                    DeclaringType = typeof(global::NuGet.ProjectModel.IAssetsLogMessage),
                    Converter = null,
                    Getter = static obj => ((global::NuGet.ProjectModel.IAssetsLogMessage)obj).Message,
                    Setter = null,
                    IgnoreCondition = null,
                    HasJsonInclude = false,
                    IsExtensionData = false,
                    NumberHandling = null,
                    PropertyName = "Message",
                    JsonPropertyName = null,
                    AttributeProviderFactory = static () => typeof(global::NuGet.ProjectModel.IAssetsLogMessage).GetProperty("Message", 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 = true,
                    DeclaringType = typeof(global::NuGet.ProjectModel.IAssetsLogMessage),
                    Converter = null,
                    Getter = static obj => ((global::NuGet.ProjectModel.IAssetsLogMessage)obj).ProjectPath,
                    Setter = null,
                    IgnoreCondition = null,
                    HasJsonInclude = false,
                    IsExtensionData = false,
                    NumberHandling = null,
                    PropertyName = "ProjectPath",
                    JsonPropertyName = null,
                    AttributeProviderFactory = static () => typeof(global::NuGet.ProjectModel.IAssetsLogMessage).GetProperty("ProjectPath", 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::NuGet.Common.WarningLevel>
                {
                    IsProperty = true,
                    IsPublic = true,
                    IsVirtual = true,
                    DeclaringType = typeof(global::NuGet.ProjectModel.IAssetsLogMessage),
                    Converter = null,
                    Getter = static obj => ((global::NuGet.ProjectModel.IAssetsLogMessage)obj).WarningLevel,
                    Setter = null,
                    IgnoreCondition = null,
                    HasJsonInclude = false,
                    IsExtensionData = false,
                    NumberHandling = null,
                    PropertyName = "WarningLevel",
                    JsonPropertyName = null,
                    AttributeProviderFactory = static () => typeof(global::NuGet.ProjectModel.IAssetsLogMessage).GetProperty("WarningLevel", InstanceMemberBindingFlags, null, typeof(global::NuGet.Common.WarningLevel), global::System.Array.Empty<global::System.Type>(), null),
                };
                
                properties[4] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::NuGet.Common.WarningLevel>(options, info4);

                var info5 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
                {
                    IsProperty = true,
                    IsPublic = true,
                    IsVirtual = true,
                    DeclaringType = typeof(global::NuGet.ProjectModel.IAssetsLogMessage),
                    Converter = null,
                    Getter = static obj => ((global::NuGet.ProjectModel.IAssetsLogMessage)obj).FilePath,
                    Setter = null,
                    IgnoreCondition = null,
                    HasJsonInclude = false,
                    IsExtensionData = false,
                    NumberHandling = null,
                    PropertyName = "FilePath",
                    JsonPropertyName = null,
                    AttributeProviderFactory = static () => typeof(global::NuGet.ProjectModel.IAssetsLogMessage).GetProperty("FilePath", 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<int>
                {
                    IsProperty = true,
                    IsPublic = true,
                    IsVirtual = true,
                    DeclaringType = typeof(global::NuGet.ProjectModel.IAssetsLogMessage),
                    Converter = null,
                    Getter = static obj => ((global::NuGet.ProjectModel.IAssetsLogMessage)obj).StartLineNumber,
                    Setter = null,
                    IgnoreCondition = null,
                    HasJsonInclude = false,
                    IsExtensionData = false,
                    NumberHandling = null,
                    PropertyName = "StartLineNumber",
                    JsonPropertyName = null,
                    AttributeProviderFactory = static () => typeof(global::NuGet.ProjectModel.IAssetsLogMessage).GetProperty("StartLineNumber", InstanceMemberBindingFlags, null, typeof(int), global::System.Array.Empty<global::System.Type>(), null),
                };
                
                properties[6] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<int>(options, info6);

                var info7 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<int>
                {
                    IsProperty = true,
                    IsPublic = true,
                    IsVirtual = true,
                    DeclaringType = typeof(global::NuGet.ProjectModel.IAssetsLogMessage),
                    Converter = null,
                    Getter = static obj => ((global::NuGet.ProjectModel.IAssetsLogMessage)obj).StartColumnNumber,
                    Setter = null,
                    IgnoreCondition = null,
                    HasJsonInclude = false,
                    IsExtensionData = false,
                    NumberHandling = null,
                    PropertyName = "StartColumnNumber",
                    JsonPropertyName = null,
                    AttributeProviderFactory = static () => typeof(global::NuGet.ProjectModel.IAssetsLogMessage).GetProperty("StartColumnNumber", InstanceMemberBindingFlags, null, typeof(int), global::System.Array.Empty<global::System.Type>(), null),
                };
                
                properties[7] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<int>(options, info7);

                var info8 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<int>
                {
                    IsProperty = true,
                    IsPublic = true,
                    IsVirtual = true,
                    DeclaringType = typeof(global::NuGet.ProjectModel.IAssetsLogMessage),
                    Converter = null,
                    Getter = static obj => ((global::NuGet.ProjectModel.IAssetsLogMessage)obj).EndLineNumber,
                    Setter = null,
                    IgnoreCondition = null,
                    HasJsonInclude = false,
                    IsExtensionData = false,
                    NumberHandling = null,
                    PropertyName = "EndLineNumber",
                    JsonPropertyName = null,
                    AttributeProviderFactory = static () => typeof(global::NuGet.ProjectModel.IAssetsLogMessage).GetProperty("EndLineNumber", InstanceMemberBindingFlags, null, typeof(int), global::System.Array.Empty<global::System.Type>(), null),
                };
                
                properties[8] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<int>(options, info8);

                var info9 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<int>
                {
                    IsProperty = true,
                    IsPublic = true,
                    IsVirtual = true,
                    DeclaringType = typeof(global::NuGet.ProjectModel.IAssetsLogMessage),
                    Converter = null,
                    Getter = static obj => ((global::NuGet.ProjectModel.IAssetsLogMessage)obj).EndColumnNumber,
                    Setter = null,
                    IgnoreCondition = null,
                    HasJsonInclude = false,
                    IsExtensionData = false,
                    NumberHandling = null,
                    PropertyName = "EndColumnNumber",
                    JsonPropertyName = null,
                    AttributeProviderFactory = static () => typeof(global::NuGet.ProjectModel.IAssetsLogMessage).GetProperty("EndColumnNumber", InstanceMemberBindingFlags, null, typeof(int), global::System.Array.Empty<global::System.Type>(), null),
                };
                
                properties[9] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<int>(options, info9);

                var info10 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
                {
                    IsProperty = true,
                    IsPublic = true,
                    IsVirtual = true,
                    DeclaringType = typeof(global::NuGet.ProjectModel.IAssetsLogMessage),
                    Converter = null,
                    Getter = static obj => ((global::NuGet.ProjectModel.IAssetsLogMessage)obj).LibraryId,
                    Setter = null,
                    IgnoreCondition = null,
                    HasJsonInclude = false,
                    IsExtensionData = false,
                    NumberHandling = null,
                    PropertyName = "LibraryId",
                    JsonPropertyName = null,
                    AttributeProviderFactory = static () => typeof(global::NuGet.ProjectModel.IAssetsLogMessage).GetProperty("LibraryId", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
                };
                
                properties[10] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info10);

                var info11 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.IReadOnlyList<string>>
                {
                    IsProperty = true,
                    IsPublic = true,
                    IsVirtual = true,
                    DeclaringType = typeof(global::NuGet.ProjectModel.IAssetsLogMessage),
                    Converter = null,
                    Getter = static obj => ((global::NuGet.ProjectModel.IAssetsLogMessage)obj).TargetGraphs,
                    Setter = null,
                    IgnoreCondition = null,
                    HasJsonInclude = false,
                    IsExtensionData = false,
                    NumberHandling = null,
                    PropertyName = "TargetGraphs",
                    JsonPropertyName = null,
                    AttributeProviderFactory = static () => typeof(global::NuGet.ProjectModel.IAssetsLogMessage).GetProperty("TargetGraphs", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IReadOnlyList<string>), global::System.Array.Empty<global::System.Type>(), null),
                };
                
                properties[11] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.IReadOnlyList<string>>(options, info11);

                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 IAssetsLogMessageSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::NuGet.ProjectModel.IAssetsLogMessage? value)
            {
                if (value is null)
                {
                    writer.WriteNullValue();
                    return;
                }
                
                writer.WriteStartObject();

                writer.WritePropertyName(PropName_Level);
                global::System.Text.Json.JsonSerializer.Serialize(writer, ((global::NuGet.ProjectModel.IAssetsLogMessage)value).Level, LogLevel);
                writer.WritePropertyName(PropName_Code);
                global::System.Text.Json.JsonSerializer.Serialize(writer, ((global::NuGet.ProjectModel.IAssetsLogMessage)value).Code, NuGetLogCode);
                writer.WriteString(PropName_Message, ((global::NuGet.ProjectModel.IAssetsLogMessage)value).Message);
                writer.WriteString(PropName_ProjectPath, ((global::NuGet.ProjectModel.IAssetsLogMessage)value).ProjectPath);
                writer.WritePropertyName(PropName_WarningLevel);
                global::System.Text.Json.JsonSerializer.Serialize(writer, ((global::NuGet.ProjectModel.IAssetsLogMessage)value).WarningLevel, WarningLevel);
                writer.WriteString(PropName_FilePath, ((global::NuGet.ProjectModel.IAssetsLogMessage)value).FilePath);
                writer.WriteNumber(PropName_StartLineNumber, ((global::NuGet.ProjectModel.IAssetsLogMessage)value).StartLineNumber);
                writer.WriteNumber(PropName_StartColumnNumber, ((global::NuGet.ProjectModel.IAssetsLogMessage)value).StartColumnNumber);
                writer.WriteNumber(PropName_EndLineNumber, ((global::NuGet.ProjectModel.IAssetsLogMessage)value).EndLineNumber);
                writer.WriteNumber(PropName_EndColumnNumber, ((global::NuGet.ProjectModel.IAssetsLogMessage)value).EndColumnNumber);
                writer.WriteString(PropName_LibraryId, ((global::NuGet.ProjectModel.IAssetsLogMessage)value).LibraryId);
                writer.WritePropertyName(PropName_TargetGraphs);
                IReadOnlyListStringSerializeHandler(writer, ((global::NuGet.ProjectModel.IAssetsLogMessage)value).TargetGraphs);

                writer.WriteEndObject();
            }
        }
    }
}