|
// <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.TestRunCompleteEventArgs>? _TestRunCompleteEventArgs;
/// <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.TestRunCompleteEventArgs> TestRunCompleteEventArgs
#nullable enable annotations
{
get => _TestRunCompleteEventArgs ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunCompleteEventArgs>)Options.GetTypeInfo(typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunCompleteEventArgs));
}
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunCompleteEventArgs> Create_TestRunCompleteEventArgs(global::System.Text.Json.JsonSerializerOptions options)
{
if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunCompleteEventArgs>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunCompleteEventArgs> jsonTypeInfo))
{
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunCompleteEventArgs>
{
ObjectCreator = null,
ObjectWithParameterizedConstructorCreator = null,
PropertyMetadataInitializer = _ => TestRunCompleteEventArgsPropInit(options),
ConstructorParameterMetadataInitializer = null,
ConstructorAttributeProviderFactory = null,
SerializeHandler = TestRunCompleteEventArgsSerializeHandler,
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.TestRunCompleteEventArgs>(options, objectInfo);
jsonTypeInfo.NumberHandling = null;
}
jsonTypeInfo.OriginatingResolver = this;
return jsonTypeInfo;
}
private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] TestRunCompleteEventArgsPropInit(global::System.Text.Json.JsonSerializerOptions options)
{
var properties = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[9];
var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.ITestRunStatistics>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunCompleteEventArgs),
Converter = null,
Getter = static obj => ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunCompleteEventArgs)obj).TestRunStatistics,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "TestRunStatistics",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunCompleteEventArgs).GetProperty("TestRunStatistics", InstanceMemberBindingFlags, null, typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.ITestRunStatistics), global::System.Array.Empty<global::System.Type>(), null),
};
properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.ITestRunStatistics>(options, info0);
var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<bool>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunCompleteEventArgs),
Converter = null,
Getter = static obj => ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunCompleteEventArgs)obj).IsCanceled,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "IsCanceled",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunCompleteEventArgs).GetProperty("IsCanceled", InstanceMemberBindingFlags, null, typeof(bool), global::System.Array.Empty<global::System.Type>(), null),
};
properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<bool>(options, info1);
var info2 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<bool>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunCompleteEventArgs),
Converter = null,
Getter = static obj => ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunCompleteEventArgs)obj).IsAborted,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "IsAborted",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunCompleteEventArgs).GetProperty("IsAborted", InstanceMemberBindingFlags, null, typeof(bool), global::System.Array.Empty<global::System.Type>(), null),
};
properties[2] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<bool>(options, info2);
var info3 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Exception>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunCompleteEventArgs),
Converter = null,
Getter = static obj => ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunCompleteEventArgs)obj).Error,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Error",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunCompleteEventArgs).GetProperty("Error", InstanceMemberBindingFlags, null, typeof(global::System.Exception), global::System.Array.Empty<global::System.Type>(), null),
};
properties[3] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Exception>(options, info3);
var info4 = 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.Client.TestRunCompleteEventArgs),
Converter = null,
Getter = static obj => ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunCompleteEventArgs)obj).AttachmentSets,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "AttachmentSets",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunCompleteEventArgs).GetProperty("AttachmentSets", InstanceMemberBindingFlags, null, typeof(global::System.Collections.ObjectModel.Collection<global::Microsoft.VisualStudio.TestPlatform.ObjectModel.AttachmentSet>), global::System.Array.Empty<global::System.Type>(), null),
};
properties[4] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.ObjectModel.Collection<global::Microsoft.VisualStudio.TestPlatform.ObjectModel.AttachmentSet>>(options, info4);
properties[4].IsGetNullable = false;
var info5 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.ObjectModel.Collection<global::Microsoft.VisualStudio.TestPlatform.ObjectModel.InvokedDataCollector>>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunCompleteEventArgs),
Converter = null,
Getter = static obj => ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunCompleteEventArgs)obj).InvokedDataCollectors,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "InvokedDataCollectors",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunCompleteEventArgs).GetProperty("InvokedDataCollectors", InstanceMemberBindingFlags, null, typeof(global::System.Collections.ObjectModel.Collection<global::Microsoft.VisualStudio.TestPlatform.ObjectModel.InvokedDataCollector>), global::System.Array.Empty<global::System.Type>(), null),
};
properties[5] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.ObjectModel.Collection<global::Microsoft.VisualStudio.TestPlatform.ObjectModel.InvokedDataCollector>>(options, info5);
properties[5].IsGetNullable = false;
var info6 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.TimeSpan>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunCompleteEventArgs),
Converter = null,
Getter = static obj => ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunCompleteEventArgs)obj).ElapsedTimeInRunningTests,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "ElapsedTimeInRunningTests",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunCompleteEventArgs).GetProperty("ElapsedTimeInRunningTests", InstanceMemberBindingFlags, null, typeof(global::System.TimeSpan), global::System.Array.Empty<global::System.Type>(), null),
};
properties[6] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.TimeSpan>(options, info6);
var info7 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.IDictionary<string, object>>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunCompleteEventArgs),
Converter = null,
Getter = static obj => ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunCompleteEventArgs)obj).Metrics,
Setter = static (obj, value) => ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunCompleteEventArgs)obj).Metrics = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Metrics",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunCompleteEventArgs).GetProperty("Metrics", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IDictionary<string, object>), global::System.Array.Empty<global::System.Type>(), null),
};
properties[7] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.IDictionary<string, object>>(options, info7);
var info8 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.HashSet<string>>>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunCompleteEventArgs),
Converter = null,
Getter = static obj => ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunCompleteEventArgs)obj).DiscoveredExtensions,
Setter = static (obj, value) => ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunCompleteEventArgs)obj).DiscoveredExtensions = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "DiscoveredExtensions",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunCompleteEventArgs).GetProperty("DiscoveredExtensions", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.HashSet<string>>), global::System.Array.Empty<global::System.Type>(), null),
};
properties[8] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.Dictionary<string, global::System.Collections.Generic.HashSet<string>>>(options, info8);
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 TestRunCompleteEventArgsSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunCompleteEventArgs? value)
{
if (value is null)
{
writer.WriteNullValue();
return;
}
writer.WriteStartObject();
writer.WritePropertyName(PropName_TestRunStatistics);
ITestRunStatisticsSerializeHandler(writer, ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunCompleteEventArgs)value).TestRunStatistics);
writer.WriteBoolean(PropName_IsCanceled, ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunCompleteEventArgs)value).IsCanceled);
writer.WriteBoolean(PropName_IsAborted, ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunCompleteEventArgs)value).IsAborted);
writer.WritePropertyName(PropName_Error);
ExceptionSerializeHandler(writer, ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunCompleteEventArgs)value).Error);
writer.WritePropertyName(PropName_AttachmentSets);
CollectionAttachmentSetSerializeHandler(writer, ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunCompleteEventArgs)value).AttachmentSets);
writer.WritePropertyName(PropName_InvokedDataCollectors);
CollectionInvokedDataCollectorSerializeHandler(writer, ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunCompleteEventArgs)value).InvokedDataCollectors);
writer.WritePropertyName(PropName_ElapsedTimeInRunningTests);
global::System.Text.Json.JsonSerializer.Serialize(writer, ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunCompleteEventArgs)value).ElapsedTimeInRunningTests, TimeSpan);
writer.WritePropertyName(PropName_Metrics);
global::System.Text.Json.JsonSerializer.Serialize(writer, ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunCompleteEventArgs)value).Metrics, IDictionaryStringObject);
writer.WritePropertyName(PropName_DiscoveredExtensions);
DictionaryStringHashSetStringSerializeHandler(writer, ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunCompleteEventArgs)value).DiscoveredExtensions);
writer.WriteEndObject();
}
}
}
|