File: _generated\65\TestPlatformJsonContext.TestResult.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.TestResult>? _TestResult;
        
        /// <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.TestResult> TestResult
        #nullable enable annotations
        {
            get => _TestResult ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestResult>)Options.GetTypeInfo(typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestResult));
        }
        
        private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestResult> Create_TestResult(global::System.Text.Json.JsonSerializerOptions options)
        {
            if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestResult>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestResult> jsonTypeInfo))
            {
                var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestResult>
                {
                    ObjectCreator = null,
                    ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestResult((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestCase)args[0]),
                    PropertyMetadataInitializer = _ => TestResultPropInit(options),
                    ConstructorParameterMetadataInitializer = TestResultCtorParamInit,
                    ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestResult).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestCase)}, modifiers: null),
                    SerializeHandler = TestResultSerializeHandler,
                    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.TestResult>(options, objectInfo);
                jsonTypeInfo.NumberHandling = null;
            }
        
            jsonTypeInfo.OriginatingResolver = this;
            return jsonTypeInfo;
        }

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

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

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

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

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

            var info5 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestResult),
                Converter = null,
                Getter = static obj => ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestResult)obj).DisplayName,
                Setter = static (obj, value) => ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestResult)obj).DisplayName = value!,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "DisplayName",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestResult).GetProperty("DisplayName", 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.ObjectModel.Collection<global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestResultMessage>>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = false,
                DeclaringType = typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestResult),
                Converter = null,
                Getter = static obj => ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestResult)obj).Messages,
                Setter = null,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Messages",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestResult).GetProperty("Messages", InstanceMemberBindingFlags, null, typeof(global::System.Collections.ObjectModel.Collection<global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestResultMessage>), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[6] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.ObjectModel.Collection<global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestResultMessage>>(options, info6);
            properties[6].IsGetNullable = false;

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

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

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

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

            var info11 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.IEnumerable<global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestProperty>>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = true,
                DeclaringType = typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestResult),
                Converter = null,
                Getter = static obj => ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestResult)obj).Properties,
                Setter = null,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Properties",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestResult).GetProperty("Properties", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IEnumerable<global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestProperty>), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[11] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.IEnumerable<global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestProperty>>(options, info11);
            properties[11].IsGetNullable = false;

            var info12 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.IEnumerable<global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestProperty>>
            {
                IsProperty = true,
                IsPublic = true,
                IsVirtual = true,
                DeclaringType = typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestObject),
                Converter = null,
                Getter = static obj => ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestObject)obj).Properties,
                Setter = null,
                IgnoreCondition = null,
                HasJsonInclude = false,
                IsExtensionData = false,
                NumberHandling = null,
                PropertyName = "Properties",
                JsonPropertyName = null,
                AttributeProviderFactory = static () => typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestObject).GetProperty("Properties", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IEnumerable<global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestProperty>), global::System.Array.Empty<global::System.Type>(), null),
            };
            
            properties[12] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.IEnumerable<global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestProperty>>(options, info12);
            properties[12].IsGetNullable = false;

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

            writer.WritePropertyName(PropName_TestCase);
            global::System.Text.Json.JsonSerializer.Serialize(writer, ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestResult)value).TestCase, TestCase);
            writer.WritePropertyName(PropName_Attachments);
            CollectionAttachmentSetSerializeHandler(writer, ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestResult)value).Attachments);
            writer.WritePropertyName(PropName_Outcome);
            global::System.Text.Json.JsonSerializer.Serialize(writer, ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestResult)value).Outcome, TestOutcome);
            writer.WriteString(PropName_ErrorMessage, ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestResult)value).ErrorMessage);
            writer.WriteString(PropName_ErrorStackTrace, ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestResult)value).ErrorStackTrace);
            writer.WriteString(PropName_DisplayName, ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestResult)value).DisplayName);
            writer.WritePropertyName(PropName_Messages);
            CollectionTestResultMessageSerializeHandler(writer, ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestResult)value).Messages);
            writer.WriteString(PropName_ComputerName, ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestResult)value).ComputerName);
            writer.WritePropertyName(PropName_Duration);
            global::System.Text.Json.JsonSerializer.Serialize(writer, ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestResult)value).Duration, TimeSpan);
            writer.WriteString(PropName_StartTime, ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestResult)value).StartTime);
            writer.WriteString(PropName_EndTime, ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestResult)value).EndTime);
            writer.WritePropertyName(PropName_Properties);
            IEnumerableTestPropertySerializeHandler(writer, ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestResult)value).Properties);
            writer.WritePropertyName(PropName_Traits);
            TraitCollectionSerializeHandler(writer, ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestObject)value).Traits);

            writer.WriteEndObject();
        }

        private static global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[] TestResultCtorParamInit() => new global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[]
        {
            new()
            {
                Name = "testCase",
                ParameterType = typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.TestCase),
                Position = 0,
                HasDefaultValue = false,
                DefaultValue = null,
                IsNullable = false,
            },
        };
    }
}