|
// <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.Commands.Tool.List
{
internal partial class ToolListJsonSerializerContext
{
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.DotNet.Cli.Commands.Tool.List.VersionedDataContract<global::Microsoft.DotNet.Cli.Commands.Tool.List.LocalToolListJsonContract[]>>? _VersionedDataContractLocalToolListJsonContractArray;
/// <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.Commands.Tool.List.VersionedDataContract<global::Microsoft.DotNet.Cli.Commands.Tool.List.LocalToolListJsonContract[]>> VersionedDataContractLocalToolListJsonContractArray
#nullable enable annotations
{
get => _VersionedDataContractLocalToolListJsonContractArray ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.DotNet.Cli.Commands.Tool.List.VersionedDataContract<global::Microsoft.DotNet.Cli.Commands.Tool.List.LocalToolListJsonContract[]>>)Options.GetTypeInfo(typeof(global::Microsoft.DotNet.Cli.Commands.Tool.List.VersionedDataContract<global::Microsoft.DotNet.Cli.Commands.Tool.List.LocalToolListJsonContract[]>));
}
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.DotNet.Cli.Commands.Tool.List.VersionedDataContract<global::Microsoft.DotNet.Cli.Commands.Tool.List.LocalToolListJsonContract[]>> Create_VersionedDataContractLocalToolListJsonContractArray(global::System.Text.Json.JsonSerializerOptions options)
{
if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.DotNet.Cli.Commands.Tool.List.VersionedDataContract<global::Microsoft.DotNet.Cli.Commands.Tool.List.LocalToolListJsonContract[]>>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.DotNet.Cli.Commands.Tool.List.VersionedDataContract<global::Microsoft.DotNet.Cli.Commands.Tool.List.LocalToolListJsonContract[]>> jsonTypeInfo))
{
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.DotNet.Cli.Commands.Tool.List.VersionedDataContract<global::Microsoft.DotNet.Cli.Commands.Tool.List.LocalToolListJsonContract[]>>
{
ObjectCreator = null,
ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.DotNet.Cli.Commands.Tool.List.VersionedDataContract<global::Microsoft.DotNet.Cli.Commands.Tool.List.LocalToolListJsonContract[]>(){ Data = (global::Microsoft.DotNet.Cli.Commands.Tool.List.LocalToolListJsonContract[])args[0] },
PropertyMetadataInitializer = _ => VersionedDataContractLocalToolListJsonContractArrayPropInit(options),
ConstructorParameterMetadataInitializer = VersionedDataContractLocalToolListJsonContractArrayCtorParamInit,
ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.Cli.Commands.Tool.List.VersionedDataContract<global::Microsoft.DotNet.Cli.Commands.Tool.List.LocalToolListJsonContract[]>).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null),
SerializeHandler = VersionedDataContractLocalToolListJsonContractArraySerializeHandler,
};
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.DotNet.Cli.Commands.Tool.List.VersionedDataContract<global::Microsoft.DotNet.Cli.Commands.Tool.List.LocalToolListJsonContract[]>>(options, objectInfo);
jsonTypeInfo.NumberHandling = null;
}
jsonTypeInfo.OriginatingResolver = this;
return jsonTypeInfo;
}
private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] VersionedDataContractLocalToolListJsonContractArrayPropInit(global::System.Text.Json.JsonSerializerOptions options)
{
var properties = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[2];
var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<int>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.DotNet.Cli.Commands.Tool.List.VersionedDataContract<global::Microsoft.DotNet.Cli.Commands.Tool.List.LocalToolListJsonContract[]>),
Converter = null,
Getter = static obj => ((global::Microsoft.DotNet.Cli.Commands.Tool.List.VersionedDataContract<global::Microsoft.DotNet.Cli.Commands.Tool.List.LocalToolListJsonContract[]>)obj).Version,
Setter = static (obj, value) => __GenericAccessors_VersionedDataContractLocalToolListJsonContractArray<global::Microsoft.DotNet.Cli.Commands.Tool.List.LocalToolListJsonContract[]>.__set_VersionedDataContractLocalToolListJsonContractArray_Version((global::Microsoft.DotNet.Cli.Commands.Tool.List.VersionedDataContract<global::Microsoft.DotNet.Cli.Commands.Tool.List.LocalToolListJsonContract[]>)obj, value!),
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Version",
JsonPropertyName = "version",
AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.Cli.Commands.Tool.List.VersionedDataContract<global::Microsoft.DotNet.Cli.Commands.Tool.List.LocalToolListJsonContract[]>).GetProperty("Version", InstanceMemberBindingFlags, null, typeof(int), global::System.Array.Empty<global::System.Type>(), null),
};
properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<int>(options, info0);
var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Microsoft.DotNet.Cli.Commands.Tool.List.LocalToolListJsonContract[]>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.DotNet.Cli.Commands.Tool.List.VersionedDataContract<global::Microsoft.DotNet.Cli.Commands.Tool.List.LocalToolListJsonContract[]>),
Converter = null,
Getter = static obj => ((global::Microsoft.DotNet.Cli.Commands.Tool.List.VersionedDataContract<global::Microsoft.DotNet.Cli.Commands.Tool.List.LocalToolListJsonContract[]>)obj).Data,
Setter = static (obj, value) => __GenericAccessors_VersionedDataContractLocalToolListJsonContractArray<global::Microsoft.DotNet.Cli.Commands.Tool.List.LocalToolListJsonContract[]>.__set_VersionedDataContractLocalToolListJsonContractArray_Data((global::Microsoft.DotNet.Cli.Commands.Tool.List.VersionedDataContract<global::Microsoft.DotNet.Cli.Commands.Tool.List.LocalToolListJsonContract[]>)obj, value!),
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Data",
JsonPropertyName = "data",
AttributeProviderFactory = static () => typeof(global::Microsoft.DotNet.Cli.Commands.Tool.List.VersionedDataContract<global::Microsoft.DotNet.Cli.Commands.Tool.List.LocalToolListJsonContract[]>).GetProperty("Data", InstanceMemberBindingFlags, null, typeof(global::Microsoft.DotNet.Cli.Commands.Tool.List.LocalToolListJsonContract[]), global::System.Array.Empty<global::System.Type>(), null),
};
properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Microsoft.DotNet.Cli.Commands.Tool.List.LocalToolListJsonContract[]>(options, info1);
properties[1].IsRequired = true;
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 VersionedDataContractLocalToolListJsonContractArraySerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.DotNet.Cli.Commands.Tool.List.VersionedDataContract<global::Microsoft.DotNet.Cli.Commands.Tool.List.LocalToolListJsonContract[]>? value)
{
if (value is null)
{
writer.WriteNullValue();
return;
}
writer.WriteStartObject();
writer.WriteNumber(PropName_version, ((global::Microsoft.DotNet.Cli.Commands.Tool.List.VersionedDataContract<global::Microsoft.DotNet.Cli.Commands.Tool.List.LocalToolListJsonContract[]>)value).Version);
writer.WritePropertyName(PropName_data);
LocalToolListJsonContractArraySerializeHandler(writer, ((global::Microsoft.DotNet.Cli.Commands.Tool.List.VersionedDataContract<global::Microsoft.DotNet.Cli.Commands.Tool.List.LocalToolListJsonContract[]>)value).Data);
writer.WriteEndObject();
}
private static global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[] VersionedDataContractLocalToolListJsonContractArrayCtorParamInit() => new global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[]
{
new()
{
Name = "Data",
ParameterType = typeof(global::Microsoft.DotNet.Cli.Commands.Tool.List.LocalToolListJsonContract[]),
Position = 0,
IsNullable = true,
IsMemberInitializer = true,
},
};
private static class __GenericAccessors_VersionedDataContractLocalToolListJsonContractArray<TContract>
{
[global::System.Runtime.CompilerServices.UnsafeAccessorAttribute(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Method, Name = "set_Version")]
public static extern void __set_VersionedDataContractLocalToolListJsonContractArray_Version(global::Microsoft.DotNet.Cli.Commands.Tool.List.VersionedDataContract<TContract> obj, int value);
[global::System.Runtime.CompilerServices.UnsafeAccessorAttribute(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Method, Name = "set_Data")]
public static extern void __set_VersionedDataContractLocalToolListJsonContractArray_Data(global::Microsoft.DotNet.Cli.Commands.Tool.List.VersionedDataContract<TContract> obj, TContract value);
}
}
}
|