File: _generated\50\TestPlatformJsonContext.TestRunRequestPayload.g.cs
Web Access
Project: src\vstest\src\Microsoft.TestPlatform.CommunicationUtilities\Microsoft.TestPlatform.CommunicationUtilities.csproj (Microsoft.TestPlatform.CommunicationUtilities)
// <auto-generated/>

#nullable enable annotations
#nullable disable warnings

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

namespace Microsoft.VisualStudio.TestPlatform.CommunicationUtilities
{
    internal partial class TestPlatformJsonContext
    {
        private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunRequestPayload>? _TestRunRequestPayload;
        
        /// <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.VisualStudio.TestPlatform.ObjectModel.Client.TestRunRequestPayload> TestRunRequestPayload
        #nullable enable annotations
        {
            get => _TestRunRequestPayload ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunRequestPayload>)Options.GetTypeInfo(typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunRequestPayload));
        }
        
        private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunRequestPayload> Create_TestRunRequestPayload(global::System.Text.Json.JsonSerializerOptions options)
        {
            if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunRequestPayload>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunRequestPayload> jsonTypeInfo))
            {
                var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunRequestPayload>
                {
                    ObjectCreator = () => new global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunRequestPayload(),
                    ObjectWithParameterizedConstructorCreator = null,
                    PropertyMetadataInitializer = _ => TestRunRequestPayloadPropInit(options),
                    ConstructorParameterMetadataInitializer = null,
                    ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunRequestPayload).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null),
                    SerializeHandler = TestRunRequestPayloadSerializeHandler,
                    PolymorphismOptions = new global::System.Text.Json.Serialization.Metadata.JsonPolymorphismOptions(),
                    TypeClassifierFactory = null,
                };
                
                jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunRequestPayload>(options, objectInfo);
                jsonTypeInfo.NumberHandling = null;
            }
        
            jsonTypeInfo.OriginatingResolver = this;
            return jsonTypeInfo;
        }

        private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] TestRunRequestPayloadPropInit(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<global::System.Collections.Generic.List<string>>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunRequestPayload),
                Converter = null,
                Getter = static obj => ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunRequestPayload)obj).Sources,
                Setter = static (obj, value) => ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunRequestPayload)obj).Sources = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Sources",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunRequestPayload).GetProperty("Sources", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.List<string>), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.List<string>>(options, info0);

            var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.List<global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestCase>>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunRequestPayload),
                Converter = null,
                Getter = static obj => ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunRequestPayload)obj).TestCases,
                Setter = static (obj, value) => ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunRequestPayload)obj).TestCases = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "TestCases",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunRequestPayload).GetProperty("TestCases", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.List<global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestCase>), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.List<global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestCase>>(options, info1);

            var info2 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunRequestPayload),
                Converter = null,
                Getter = static obj => ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunRequestPayload)obj).RunSettings,
                Setter = static (obj, value) => ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunRequestPayload)obj).RunSettings = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "RunSettings",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunRequestPayload).GetProperty("RunSettings", 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::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunRequestPayload),
                Converter = null,
                Getter = static obj => ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunRequestPayload)obj).KeepAlive,
                Setter = static (obj, value) => ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunRequestPayload)obj).KeepAlive = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "KeepAlive",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunRequestPayload).GetProperty("KeepAlive", 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::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunRequestPayload),
                Converter = null,
                Getter = static obj => ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunRequestPayload)obj).DebuggingEnabled,
                Setter = static (obj, value) => ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunRequestPayload)obj).DebuggingEnabled = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "DebuggingEnabled",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunRequestPayload).GetProperty("DebuggingEnabled", 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::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestPlatformOptions>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunRequestPayload),
                Converter = null,
                Getter = static obj => ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunRequestPayload)obj).TestPlatformOptions,
                Setter = static (obj, value) => ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunRequestPayload)obj).TestPlatformOptions = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "TestPlatformOptions",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunRequestPayload).GetProperty("TestPlatformOptions", InstanceMemberBindingFlags, null, typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestPlatformOptions), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[5] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestPlatformOptions>(options, info5);

            var info6 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestSessionInfo>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunRequestPayload),
                Converter = null,
                Getter = static obj => ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunRequestPayload)obj).TestSessionInfo,
                Setter = static (obj, value) => ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunRequestPayload)obj).TestSessionInfo = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "TestSessionInfo",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunRequestPayload).GetProperty("TestSessionInfo", InstanceMemberBindingFlags, null, typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestSessionInfo), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[6] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestSessionInfo>(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 TestRunRequestPayloadSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunRequestPayload? value)
        {
            if (value is null)
            {
                writer.WriteNullValue();
                return;
            }
            
            writer.WriteStartObject();

            writer.WritePropertyName(PropName_Sources);
            ListStringSerializeHandler(writer, ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunRequestPayload)value).Sources);
            writer.WritePropertyName(PropName_TestCases);
            ListTestCaseSerializeHandler(writer, ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunRequestPayload)value).TestCases);
            writer.WriteString(PropName_RunSettings, ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunRequestPayload)value).RunSettings);
            writer.WriteBoolean(PropName_KeepAlive, ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunRequestPayload)value).KeepAlive);
            writer.WriteBoolean(PropName_DebuggingEnabled, ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunRequestPayload)value).DebuggingEnabled);
            writer.WritePropertyName(PropName_TestPlatformOptions);
            TestPlatformOptionsSerializeHandler(writer, ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunRequestPayload)value).TestPlatformOptions);
            writer.WritePropertyName(PropName_TestSessionInfo);
            TestSessionInfoSerializeHandler(writer, ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunRequestPayload)value).TestSessionInfo);

            writer.WriteEndObject();
        }
    }
}