File: _generated\4\TelemetryJsonContext.RemoteDependencyData.g.cs
Web Access
Project: src\sdk\src\Cli\Microsoft.DotNet.Cli.Telemetry\Microsoft.DotNet.Cli.Telemetry.csproj (Microsoft.DotNet.Cli.Telemetry)
// <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.Cli.Telemetry.Implementation
{
    internal sealed partial class TelemetryJsonContext
    {
        private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.DotNet.Cli.Telemetry.Implementation.RemoteDependencyData>? _RemoteDependencyData;
        
        /// <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.Cli.Telemetry.Implementation.RemoteDependencyData> RemoteDependencyData
        #nullable enable annotations
        {
            get => _RemoteDependencyData ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.DotNet.Cli.Telemetry.Implementation.RemoteDependencyData>)Options.GetTypeInfo(typeof(global::Microsoft.DotNet.Cli.Telemetry.Implementation.RemoteDependencyData));
        }
        
        private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.DotNet.Cli.Telemetry.Implementation.RemoteDependencyData> Create_RemoteDependencyData(global::System.Text.Json.JsonSerializerOptions options)
        {
            if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.DotNet.Cli.Telemetry.Implementation.RemoteDependencyData>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.DotNet.Cli.Telemetry.Implementation.RemoteDependencyData> jsonTypeInfo))
            {
                var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.DotNet.Cli.Telemetry.Implementation.RemoteDependencyData>
                {
                    ObjectCreator = () => new global::Microsoft.DotNet.Cli.Telemetry.Implementation.RemoteDependencyData(),
                    ObjectWithParameterizedConstructorCreator = null,
                    PropertyMetadataInitializer = _ => RemoteDependencyDataPropInit(options),
                    ConstructorParameterMetadataInitializer = null,
                    ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.Cli.Telemetry.Implementation.RemoteDependencyData).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null),
                    SerializeHandler = RemoteDependencyDataSerializeHandler,
                    PolymorphismOptions = new global::System.Text.Json.Serialization.Metadata.JsonPolymorphismOptions(),
                    TypeClassifierFactory = null,
                };
                
                jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.DotNet.Cli.Telemetry.Implementation.RemoteDependencyData>(options, objectInfo);
                jsonTypeInfo.NumberHandling = null;
            }
        
            jsonTypeInfo.OriginatingResolver = this;
            return jsonTypeInfo;
        }

        private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] RemoteDependencyDataPropInit(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<string>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.DotNet.Cli.Telemetry.Implementation.RemoteDependencyData),
                Converter = null,
                Getter = static obj => ((global::Microsoft.DotNet.Cli.Telemetry.Implementation.RemoteDependencyData)obj).Id,
                Setter = static (obj, value) => ((global::Microsoft.DotNet.Cli.Telemetry.Implementation.RemoteDependencyData)obj).Id = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Id",
                JsonPropertyName = "id",
                AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.Cli.Telemetry.Implementation.RemoteDependencyData).GetProperty("Id", 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<string>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.DotNet.Cli.Telemetry.Implementation.RemoteDependencyData),
                Converter = null,
                Getter = static obj => ((global::Microsoft.DotNet.Cli.Telemetry.Implementation.RemoteDependencyData)obj).Name,
                Setter = static (obj, value) => ((global::Microsoft.DotNet.Cli.Telemetry.Implementation.RemoteDependencyData)obj).Name = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Name",
                JsonPropertyName = "name",
                AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.Cli.Telemetry.Implementation.RemoteDependencyData).GetProperty("Name", 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.Cli.Telemetry.Implementation.RemoteDependencyData),
                Converter = null,
                Getter = static obj => ((global::Microsoft.DotNet.Cli.Telemetry.Implementation.RemoteDependencyData)obj).Type,
                Setter = static (obj, value) => ((global::Microsoft.DotNet.Cli.Telemetry.Implementation.RemoteDependencyData)obj).Type = value!,
                IgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Type",
                JsonPropertyName = "type",
                AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.Cli.Telemetry.Implementation.RemoteDependencyData).GetProperty("Type", 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.Cli.Telemetry.Implementation.RemoteDependencyData),
                Converter = null,
                Getter = static obj => ((global::Microsoft.DotNet.Cli.Telemetry.Implementation.RemoteDependencyData)obj).Duration,
                Setter = static (obj, value) => ((global::Microsoft.DotNet.Cli.Telemetry.Implementation.RemoteDependencyData)obj).Duration = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Duration",
                JsonPropertyName = "duration",
                AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.Cli.Telemetry.Implementation.RemoteDependencyData).GetProperty("Duration", 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);
            properties[3].IsGetNullable = false;
            properties[3].IsSetNullable = false;

            var info4 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<bool>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.DotNet.Cli.Telemetry.Implementation.RemoteDependencyData),
                Converter = null,
                Getter = static obj => ((global::Microsoft.DotNet.Cli.Telemetry.Implementation.RemoteDependencyData)obj).Success,
                Setter = static (obj, value) => ((global::Microsoft.DotNet.Cli.Telemetry.Implementation.RemoteDependencyData)obj).Success = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Success",
                JsonPropertyName = "success",
                AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.Cli.Telemetry.Implementation.RemoteDependencyData).GetProperty("Success", 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<global::System.Collections.Generic.Dictionary<string, string>>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.DotNet.Cli.Telemetry.Implementation.RemoteDependencyData),
                Converter = null,
                Getter = static obj => ((global::Microsoft.DotNet.Cli.Telemetry.Implementation.RemoteDependencyData)obj).Properties,
                Setter = static (obj, value) => ((global::Microsoft.DotNet.Cli.Telemetry.Implementation.RemoteDependencyData)obj).Properties = value!,
                IgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Properties",
                JsonPropertyName = "properties",
                AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.Cli.Telemetry.Implementation.RemoteDependencyData).GetProperty("Properties", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.Dictionary<string, string>), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[5] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.Dictionary<string, string>>(options, info5);

            var info6 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<int>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.DotNet.Cli.Telemetry.Implementation.RemoteDependencyData),
                Converter = null,
                Getter = static obj => ((global::Microsoft.DotNet.Cli.Telemetry.Implementation.RemoteDependencyData)obj).Ver,
                Setter = static (obj, value) => ((global::Microsoft.DotNet.Cli.Telemetry.Implementation.RemoteDependencyData)obj).Ver = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Ver",
                JsonPropertyName = "ver",
                AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.Cli.Telemetry.Implementation.RemoteDependencyData).GetProperty("Ver", 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);

            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 RemoteDependencyDataSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.DotNet.Cli.Telemetry.Implementation.RemoteDependencyData? value)
        {
            if (value is null)
            {
                writer.WriteNullValue();
                return;
            }
            
            writer.WriteStartObject();

            writer.WriteString(PropName_id, ((global::Microsoft.DotNet.Cli.Telemetry.Implementation.RemoteDependencyData)value).Id);
            writer.WriteString(PropName_name, ((global::Microsoft.DotNet.Cli.Telemetry.Implementation.RemoteDependencyData)value).Name);
            string __value_Type = ((global::Microsoft.DotNet.Cli.Telemetry.Implementation.RemoteDependencyData)value).Type;
            if (__value_Type is not null)
            {
                writer.WriteString(PropName_type, __value_Type);
            }
            writer.WriteString(PropName_duration, ((global::Microsoft.DotNet.Cli.Telemetry.Implementation.RemoteDependencyData)value).Duration);
            writer.WriteBoolean(PropName_success, ((global::Microsoft.DotNet.Cli.Telemetry.Implementation.RemoteDependencyData)value).Success);
            global::System.Collections.Generic.Dictionary<string, string> __value_Properties = ((global::Microsoft.DotNet.Cli.Telemetry.Implementation.RemoteDependencyData)value).Properties;
            if (__value_Properties is not null)
            {
                writer.WritePropertyName(PropName_properties);
                DictionaryStringStringSerializeHandler(writer, __value_Properties);
            }
            writer.WriteNumber(PropName_ver, ((global::Microsoft.DotNet.Cli.Telemetry.Implementation.RemoteDependencyData)value).Ver);

            writer.WriteEndObject();
        }
    }
}