|
// <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.InvokedDataCollector>? _InvokedDataCollector;
/// <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.InvokedDataCollector> InvokedDataCollector
#nullable enable annotations
{
get => _InvokedDataCollector ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.VisualStudio.TestPlatform.ObjectModel.InvokedDataCollector>)Options.GetTypeInfo(typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.InvokedDataCollector));
}
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.VisualStudio.TestPlatform.ObjectModel.InvokedDataCollector> Create_InvokedDataCollector(global::System.Text.Json.JsonSerializerOptions options)
{
if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.VisualStudio.TestPlatform.ObjectModel.InvokedDataCollector>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.VisualStudio.TestPlatform.ObjectModel.InvokedDataCollector> jsonTypeInfo))
{
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.VisualStudio.TestPlatform.ObjectModel.InvokedDataCollector>
{
ObjectCreator = null,
ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.VisualStudio.TestPlatform.ObjectModel.InvokedDataCollector((global::System.Uri)args[0], (string)args[1], (string)args[2], (string)args[3], (bool)args[4]),
PropertyMetadataInitializer = _ => InvokedDataCollectorPropInit(options),
ConstructorParameterMetadataInitializer = InvokedDataCollectorCtorParamInit,
ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.InvokedDataCollector).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(global::System.Uri), typeof(string), typeof(string), typeof(string), typeof(bool)}, modifiers: null),
SerializeHandler = InvokedDataCollectorSerializeHandler,
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.InvokedDataCollector>(options, objectInfo);
jsonTypeInfo.NumberHandling = null;
}
jsonTypeInfo.OriginatingResolver = this;
return jsonTypeInfo;
}
private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] InvokedDataCollectorPropInit(global::System.Text.Json.JsonSerializerOptions options)
{
var properties = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[5];
var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Uri>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.InvokedDataCollector),
Converter = null,
Getter = static obj => ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.InvokedDataCollector)obj).Uri,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Uri",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.InvokedDataCollector).GetProperty("Uri", InstanceMemberBindingFlags, null, typeof(global::System.Uri), global::System.Array.Empty<global::System.Type>(), null),
};
properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Uri>(options, info0);
properties[0].IsGetNullable = false;
var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.InvokedDataCollector),
Converter = null,
Getter = static obj => ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.InvokedDataCollector)obj).FriendlyName,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "FriendlyName",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.InvokedDataCollector).GetProperty("FriendlyName", 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);
properties[1].IsGetNullable = false;
var info2 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.InvokedDataCollector),
Converter = null,
Getter = static obj => ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.InvokedDataCollector)obj).AssemblyQualifiedName,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "AssemblyQualifiedName",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.InvokedDataCollector).GetProperty("AssemblyQualifiedName", 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);
properties[2].IsGetNullable = false;
var info3 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.InvokedDataCollector),
Converter = null,
Getter = static obj => ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.InvokedDataCollector)obj).FilePath,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "FilePath",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.InvokedDataCollector).GetProperty("FilePath", 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;
var info4 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<bool>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.InvokedDataCollector),
Converter = null,
Getter = static obj => ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.InvokedDataCollector)obj).HasAttachmentProcessor,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "HasAttachmentProcessor",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.VisualStudio.TestPlatform.ObjectModel.InvokedDataCollector).GetProperty("HasAttachmentProcessor", 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);
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 InvokedDataCollectorSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.VisualStudio.TestPlatform.ObjectModel.InvokedDataCollector? value)
{
if (value is null)
{
writer.WriteNullValue();
return;
}
writer.WriteStartObject();
writer.WritePropertyName(PropName_Uri);
global::System.Text.Json.JsonSerializer.Serialize(writer, ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.InvokedDataCollector)value).Uri, Uri);
writer.WriteString(PropName_FriendlyName, ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.InvokedDataCollector)value).FriendlyName);
writer.WriteString(PropName_AssemblyQualifiedName, ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.InvokedDataCollector)value).AssemblyQualifiedName);
writer.WriteString(PropName_FilePath, ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.InvokedDataCollector)value).FilePath);
writer.WriteBoolean(PropName_HasAttachmentProcessor, ((global::Microsoft.VisualStudio.TestPlatform.ObjectModel.InvokedDataCollector)value).HasAttachmentProcessor);
writer.WriteEndObject();
}
private static global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[] InvokedDataCollectorCtorParamInit() => new global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[]
{
new()
{
Name = "uri",
ParameterType = typeof(global::System.Uri),
Position = 0,
HasDefaultValue = false,
DefaultValue = null,
IsNullable = false,
},
new()
{
Name = "friendlyName",
ParameterType = typeof(string),
Position = 1,
HasDefaultValue = false,
DefaultValue = null,
IsNullable = false,
},
new()
{
Name = "assemblyQualifiedName",
ParameterType = typeof(string),
Position = 2,
HasDefaultValue = false,
DefaultValue = null,
IsNullable = false,
},
new()
{
Name = "filePath",
ParameterType = typeof(string),
Position = 3,
HasDefaultValue = false,
DefaultValue = null,
IsNullable = false,
},
new()
{
Name = "hasAttachmentProcessor",
ParameterType = typeof(bool),
Position = 4,
HasDefaultValue = false,
DefaultValue = null,
IsNullable = false,
},
};
}
}
|