|
// <auto-generated/>
#nullable enable annotations
#nullable disable warnings
// Suppress warnings about [Obsolete] member usage in generated code.
#pragma warning disable CS0612, CS0618
namespace NuGet.CommandLine.XPlat
{
internal partial class PackageSearchJsonContext
{
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.Frameworks.NuGetFramework>? _NuGetFramework;
/// <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::NuGet.Frameworks.NuGetFramework> NuGetFramework
#nullable enable annotations
{
get => _NuGetFramework ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.Frameworks.NuGetFramework>)Options.GetTypeInfo(typeof(global::NuGet.Frameworks.NuGetFramework));
}
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.Frameworks.NuGetFramework> Create_NuGetFramework(global::System.Text.Json.JsonSerializerOptions options)
{
if (!TryGetTypeInfoForRuntimeCustomConverter<global::NuGet.Frameworks.NuGetFramework>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.Frameworks.NuGetFramework> jsonTypeInfo))
{
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::NuGet.Frameworks.NuGetFramework>
{
ObjectCreator = null,
ObjectWithParameterizedConstructorCreator = null,
PropertyMetadataInitializer = _ => NuGetFrameworkPropInit(options),
ConstructorParameterMetadataInitializer = null,
ConstructorAttributeProviderFactory = null,
SerializeHandler = NuGetFrameworkSerializeHandler,
};
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::NuGet.Frameworks.NuGetFramework>(options, objectInfo);
jsonTypeInfo.NumberHandling = null;
}
jsonTypeInfo.OriginatingResolver = this;
return jsonTypeInfo;
}
private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] NuGetFrameworkPropInit(global::System.Text.Json.JsonSerializerOptions options)
{
var properties = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[16];
var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::NuGet.Frameworks.NuGetFramework),
Converter = null,
Getter = static obj => ((global::NuGet.Frameworks.NuGetFramework)obj).Framework,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Framework",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::NuGet.Frameworks.NuGetFramework).GetProperty("Framework", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
};
properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info0);
properties[0].IsGetNullable = false;
var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Version>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::NuGet.Frameworks.NuGetFramework),
Converter = null,
Getter = static obj => ((global::NuGet.Frameworks.NuGetFramework)obj).Version,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Version",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::NuGet.Frameworks.NuGetFramework).GetProperty("Version", InstanceMemberBindingFlags, null, typeof(global::System.Version), global::System.Array.Empty<global::System.Type>(), null),
};
properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Version>(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::NuGet.Frameworks.NuGetFramework),
Converter = null,
Getter = static obj => ((global::NuGet.Frameworks.NuGetFramework)obj).Platform,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Platform",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::NuGet.Frameworks.NuGetFramework).GetProperty("Platform", 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<global::System.Version>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::NuGet.Frameworks.NuGetFramework),
Converter = null,
Getter = static obj => ((global::NuGet.Frameworks.NuGetFramework)obj).PlatformVersion,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "PlatformVersion",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::NuGet.Frameworks.NuGetFramework).GetProperty("PlatformVersion", InstanceMemberBindingFlags, null, typeof(global::System.Version), global::System.Array.Empty<global::System.Type>(), null),
};
properties[3] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Version>(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::NuGet.Frameworks.NuGetFramework),
Converter = null,
Getter = static obj => ((global::NuGet.Frameworks.NuGetFramework)obj).HasPlatform,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "HasPlatform",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::NuGet.Frameworks.NuGetFramework).GetProperty("HasPlatform", 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<bool>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::NuGet.Frameworks.NuGetFramework),
Converter = null,
Getter = static obj => ((global::NuGet.Frameworks.NuGetFramework)obj).HasProfile,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "HasProfile",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::NuGet.Frameworks.NuGetFramework).GetProperty("HasProfile", InstanceMemberBindingFlags, null, typeof(bool), global::System.Array.Empty<global::System.Type>(), null),
};
properties[5] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<bool>(options, info5);
var info6 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::NuGet.Frameworks.NuGetFramework),
Converter = null,
Getter = static obj => ((global::NuGet.Frameworks.NuGetFramework)obj).Profile,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Profile",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::NuGet.Frameworks.NuGetFramework).GetProperty("Profile", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
};
properties[6] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(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::NuGet.Frameworks.NuGetFramework),
Converter = null,
Getter = static obj => ((global::NuGet.Frameworks.NuGetFramework)obj).DotNetFrameworkName,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "DotNetFrameworkName",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::NuGet.Frameworks.NuGetFramework).GetProperty("DotNetFrameworkName", 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);
properties[7].IsGetNullable = false;
var info8 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::NuGet.Frameworks.NuGetFramework),
Converter = null,
Getter = static obj => ((global::NuGet.Frameworks.NuGetFramework)obj).DotNetPlatformName,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "DotNetPlatformName",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::NuGet.Frameworks.NuGetFramework).GetProperty("DotNetPlatformName", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
};
properties[8] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info8);
properties[8].IsGetNullable = false;
var info9 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<bool>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::NuGet.Frameworks.NuGetFramework),
Converter = null,
Getter = static obj => ((global::NuGet.Frameworks.NuGetFramework)obj).IsPCL,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "IsPCL",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::NuGet.Frameworks.NuGetFramework).GetProperty("IsPCL", InstanceMemberBindingFlags, null, typeof(bool), global::System.Array.Empty<global::System.Type>(), null),
};
properties[9] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<bool>(options, info9);
var info10 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<bool>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::NuGet.Frameworks.NuGetFramework),
Converter = null,
Getter = static obj => ((global::NuGet.Frameworks.NuGetFramework)obj).IsPackageBased,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "IsPackageBased",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::NuGet.Frameworks.NuGetFramework).GetProperty("IsPackageBased", InstanceMemberBindingFlags, null, typeof(bool), global::System.Array.Empty<global::System.Type>(), null),
};
properties[10] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<bool>(options, info10);
var info11 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<bool>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::NuGet.Frameworks.NuGetFramework),
Converter = null,
Getter = static obj => ((global::NuGet.Frameworks.NuGetFramework)obj).AllFrameworkVersions,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "AllFrameworkVersions",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::NuGet.Frameworks.NuGetFramework).GetProperty("AllFrameworkVersions", InstanceMemberBindingFlags, null, typeof(bool), global::System.Array.Empty<global::System.Type>(), null),
};
properties[11] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<bool>(options, info11);
var info12 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<bool>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::NuGet.Frameworks.NuGetFramework),
Converter = null,
Getter = static obj => ((global::NuGet.Frameworks.NuGetFramework)obj).IsUnsupported,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "IsUnsupported",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::NuGet.Frameworks.NuGetFramework).GetProperty("IsUnsupported", InstanceMemberBindingFlags, null, typeof(bool), global::System.Array.Empty<global::System.Type>(), null),
};
properties[12] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<bool>(options, info12);
var info13 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<bool>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::NuGet.Frameworks.NuGetFramework),
Converter = null,
Getter = static obj => ((global::NuGet.Frameworks.NuGetFramework)obj).IsAgnostic,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "IsAgnostic",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::NuGet.Frameworks.NuGetFramework).GetProperty("IsAgnostic", InstanceMemberBindingFlags, null, typeof(bool), global::System.Array.Empty<global::System.Type>(), null),
};
properties[13] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<bool>(options, info13);
var info14 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<bool>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::NuGet.Frameworks.NuGetFramework),
Converter = null,
Getter = static obj => ((global::NuGet.Frameworks.NuGetFramework)obj).IsAny,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "IsAny",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::NuGet.Frameworks.NuGetFramework).GetProperty("IsAny", InstanceMemberBindingFlags, null, typeof(bool), global::System.Array.Empty<global::System.Type>(), null),
};
properties[14] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<bool>(options, info14);
var info15 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<bool>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::NuGet.Frameworks.NuGetFramework),
Converter = null,
Getter = static obj => ((global::NuGet.Frameworks.NuGetFramework)obj).IsSpecificFramework,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "IsSpecificFramework",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::NuGet.Frameworks.NuGetFramework).GetProperty("IsSpecificFramework", InstanceMemberBindingFlags, null, typeof(bool), global::System.Array.Empty<global::System.Type>(), null),
};
properties[15] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<bool>(options, info15);
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 NuGetFrameworkSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::NuGet.Frameworks.NuGetFramework? value)
{
if (value is null)
{
writer.WriteNullValue();
return;
}
writer.WriteStartObject();
writer.WriteString(PropName_Framework, ((global::NuGet.Frameworks.NuGetFramework)value).Framework);
writer.WritePropertyName(PropName_Version);
global::System.Text.Json.JsonSerializer.Serialize(writer, ((global::NuGet.Frameworks.NuGetFramework)value).Version, Version);
writer.WriteString(PropName_Platform, ((global::NuGet.Frameworks.NuGetFramework)value).Platform);
writer.WritePropertyName(PropName_PlatformVersion);
global::System.Text.Json.JsonSerializer.Serialize(writer, ((global::NuGet.Frameworks.NuGetFramework)value).PlatformVersion, Version);
writer.WriteBoolean(PropName_HasPlatform, ((global::NuGet.Frameworks.NuGetFramework)value).HasPlatform);
writer.WriteBoolean(PropName_HasProfile, ((global::NuGet.Frameworks.NuGetFramework)value).HasProfile);
writer.WriteString(PropName_Profile, ((global::NuGet.Frameworks.NuGetFramework)value).Profile);
writer.WriteString(PropName_DotNetFrameworkName, ((global::NuGet.Frameworks.NuGetFramework)value).DotNetFrameworkName);
writer.WriteString(PropName_DotNetPlatformName, ((global::NuGet.Frameworks.NuGetFramework)value).DotNetPlatformName);
writer.WriteBoolean(PropName_IsPCL, ((global::NuGet.Frameworks.NuGetFramework)value).IsPCL);
writer.WriteBoolean(PropName_IsPackageBased, ((global::NuGet.Frameworks.NuGetFramework)value).IsPackageBased);
writer.WriteBoolean(PropName_AllFrameworkVersions, ((global::NuGet.Frameworks.NuGetFramework)value).AllFrameworkVersions);
writer.WriteBoolean(PropName_IsUnsupported, ((global::NuGet.Frameworks.NuGetFramework)value).IsUnsupported);
writer.WriteBoolean(PropName_IsAgnostic, ((global::NuGet.Frameworks.NuGetFramework)value).IsAgnostic);
writer.WriteBoolean(PropName_IsAny, ((global::NuGet.Frameworks.NuGetFramework)value).IsAny);
writer.WriteBoolean(PropName_IsSpecificFramework, ((global::NuGet.Frameworks.NuGetFramework)value).IsSpecificFramework);
writer.WriteEndObject();
}
}
}
|