|
// <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.Versioning.VersionRange>? _VersionRange;
/// <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.Versioning.VersionRange> VersionRange
#nullable enable annotations
{
get => _VersionRange ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.Versioning.VersionRange>)Options.GetTypeInfo(typeof(global::NuGet.Versioning.VersionRange));
}
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.Versioning.VersionRange> Create_VersionRange(global::System.Text.Json.JsonSerializerOptions options)
{
if (!TryGetTypeInfoForRuntimeCustomConverter<global::NuGet.Versioning.VersionRange>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::NuGet.Versioning.VersionRange> jsonTypeInfo))
{
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::NuGet.Versioning.VersionRange>
{
ObjectCreator = null,
ObjectWithParameterizedConstructorCreator = null,
PropertyMetadataInitializer = _ => VersionRangePropInit(options),
ConstructorParameterMetadataInitializer = null,
ConstructorAttributeProviderFactory = null,
SerializeHandler = VersionRangeSerializeHandler,
};
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::NuGet.Versioning.VersionRange>(options, objectInfo);
jsonTypeInfo.NumberHandling = null;
}
jsonTypeInfo.OriginatingResolver = this;
return jsonTypeInfo;
}
private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] VersionRangePropInit(global::System.Text.Json.JsonSerializerOptions options)
{
var properties = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[17];
var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<bool>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::NuGet.Versioning.VersionRange),
Converter = null,
Getter = static obj => ((global::NuGet.Versioning.VersionRange)obj).IsFloating,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "IsFloating",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::NuGet.Versioning.VersionRange).GetProperty("IsFloating", InstanceMemberBindingFlags, null, typeof(bool), global::System.Array.Empty<global::System.Type>(), null),
};
properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<bool>(options, info0);
var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::NuGet.Versioning.NuGetVersion>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::NuGet.Versioning.VersionRange),
Converter = null,
Getter = static obj => ((global::NuGet.Versioning.VersionRange)obj).MinVersion,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "MinVersion",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::NuGet.Versioning.VersionRange).GetProperty("MinVersion", InstanceMemberBindingFlags, null, typeof(global::NuGet.Versioning.NuGetVersion), global::System.Array.Empty<global::System.Type>(), null),
};
properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::NuGet.Versioning.NuGetVersion>(options, info1);
var info2 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::NuGet.Versioning.NuGetVersion>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::NuGet.Versioning.VersionRange),
Converter = null,
Getter = static obj => ((global::NuGet.Versioning.VersionRange)obj).MaxVersion,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "MaxVersion",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::NuGet.Versioning.VersionRange).GetProperty("MaxVersion", InstanceMemberBindingFlags, null, typeof(global::NuGet.Versioning.NuGetVersion), global::System.Array.Empty<global::System.Type>(), null),
};
properties[2] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::NuGet.Versioning.NuGetVersion>(options, info2);
var info3 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<bool>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::NuGet.Versioning.VersionRange),
Converter = null,
Getter = static obj => ((global::NuGet.Versioning.VersionRange)obj).HasLowerBound,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "HasLowerBound",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::NuGet.Versioning.VersionRange).GetProperty("HasLowerBound", InstanceMemberBindingFlags, null, typeof(bool), global::System.Array.Empty<global::System.Type>(), null),
};
properties[3] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<bool>(options, info3);
var info4 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<bool>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::NuGet.Versioning.VersionRange),
Converter = null,
Getter = static obj => ((global::NuGet.Versioning.VersionRange)obj).IsMinInclusive,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "IsMinInclusive",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::NuGet.Versioning.VersionRange).GetProperty("IsMinInclusive", 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.Versioning.VersionRange),
Converter = null,
Getter = static obj => ((global::NuGet.Versioning.VersionRange)obj).HasUpperBound,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "HasUpperBound",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::NuGet.Versioning.VersionRange).GetProperty("HasUpperBound", 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<bool>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::NuGet.Versioning.VersionRange),
Converter = null,
Getter = static obj => ((global::NuGet.Versioning.VersionRange)obj).IsMaxInclusive,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "IsMaxInclusive",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::NuGet.Versioning.VersionRange).GetProperty("IsMaxInclusive", InstanceMemberBindingFlags, null, typeof(bool), global::System.Array.Empty<global::System.Type>(), null),
};
properties[6] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<bool>(options, info6);
var info7 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<bool>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::NuGet.Versioning.VersionRange),
Converter = null,
Getter = static obj => ((global::NuGet.Versioning.VersionRange)obj).HasLowerAndUpperBounds,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "HasLowerAndUpperBounds",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::NuGet.Versioning.VersionRange).GetProperty("HasLowerAndUpperBounds", InstanceMemberBindingFlags, null, typeof(bool), global::System.Array.Empty<global::System.Type>(), null),
};
properties[7] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<bool>(options, info7);
var info8 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::NuGet.Versioning.FloatRange>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::NuGet.Versioning.VersionRange),
Converter = null,
Getter = static obj => ((global::NuGet.Versioning.VersionRange)obj).Float,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Float",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::NuGet.Versioning.VersionRange).GetProperty("Float", InstanceMemberBindingFlags, null, typeof(global::NuGet.Versioning.FloatRange), global::System.Array.Empty<global::System.Type>(), null),
};
properties[8] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::NuGet.Versioning.FloatRange>(options, info8);
var info9 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::NuGet.Versioning.VersionRange),
Converter = null,
Getter = static obj => ((global::NuGet.Versioning.VersionRange)obj).OriginalString,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "OriginalString",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::NuGet.Versioning.VersionRange).GetProperty("OriginalString", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
};
properties[9] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info9);
var info10 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<bool>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::NuGet.Versioning.VersionRangeBase),
Converter = null,
Getter = static obj => ((global::NuGet.Versioning.VersionRangeBase)obj).HasLowerBound,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "HasLowerBound",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::NuGet.Versioning.VersionRangeBase).GetProperty("HasLowerBound", 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.Versioning.VersionRangeBase),
Converter = null,
Getter = static obj => ((global::NuGet.Versioning.VersionRangeBase)obj).HasUpperBound,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "HasUpperBound",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::NuGet.Versioning.VersionRangeBase).GetProperty("HasUpperBound", 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.Versioning.VersionRangeBase),
Converter = null,
Getter = static obj => ((global::NuGet.Versioning.VersionRangeBase)obj).HasLowerAndUpperBounds,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "HasLowerAndUpperBounds",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::NuGet.Versioning.VersionRangeBase).GetProperty("HasLowerAndUpperBounds", 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.Versioning.VersionRangeBase),
Converter = null,
Getter = static obj => ((global::NuGet.Versioning.VersionRangeBase)obj).IsMinInclusive,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "IsMinInclusive",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::NuGet.Versioning.VersionRangeBase).GetProperty("IsMinInclusive", 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.Versioning.VersionRangeBase),
Converter = null,
Getter = static obj => ((global::NuGet.Versioning.VersionRangeBase)obj).IsMaxInclusive,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "IsMaxInclusive",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::NuGet.Versioning.VersionRangeBase).GetProperty("IsMaxInclusive", 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<global::NuGet.Versioning.NuGetVersion>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::NuGet.Versioning.VersionRangeBase),
Converter = null,
Getter = static obj => ((global::NuGet.Versioning.VersionRangeBase)obj).MaxVersion,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "MaxVersion",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::NuGet.Versioning.VersionRangeBase).GetProperty("MaxVersion", InstanceMemberBindingFlags, null, typeof(global::NuGet.Versioning.NuGetVersion), global::System.Array.Empty<global::System.Type>(), null),
};
properties[15] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::NuGet.Versioning.NuGetVersion>(options, info15);
var info16 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::NuGet.Versioning.NuGetVersion>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::NuGet.Versioning.VersionRangeBase),
Converter = null,
Getter = static obj => ((global::NuGet.Versioning.VersionRangeBase)obj).MinVersion,
Setter = null,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "MinVersion",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::NuGet.Versioning.VersionRangeBase).GetProperty("MinVersion", InstanceMemberBindingFlags, null, typeof(global::NuGet.Versioning.NuGetVersion), global::System.Array.Empty<global::System.Type>(), null),
};
properties[16] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::NuGet.Versioning.NuGetVersion>(options, info16);
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 VersionRangeSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::NuGet.Versioning.VersionRange? value)
{
if (value is null)
{
writer.WriteNullValue();
return;
}
writer.WriteStartObject();
writer.WriteBoolean(PropName_IsFloating, ((global::NuGet.Versioning.VersionRange)value).IsFloating);
writer.WritePropertyName(PropName_MinVersion);
NuGetVersionSerializeHandler(writer, ((global::NuGet.Versioning.VersionRange)value).MinVersion);
writer.WritePropertyName(PropName_MaxVersion);
NuGetVersionSerializeHandler(writer, ((global::NuGet.Versioning.VersionRange)value).MaxVersion);
writer.WriteBoolean(PropName_HasLowerBound, ((global::NuGet.Versioning.VersionRange)value).HasLowerBound);
writer.WriteBoolean(PropName_IsMinInclusive, ((global::NuGet.Versioning.VersionRange)value).IsMinInclusive);
writer.WriteBoolean(PropName_HasUpperBound, ((global::NuGet.Versioning.VersionRange)value).HasUpperBound);
writer.WriteBoolean(PropName_IsMaxInclusive, ((global::NuGet.Versioning.VersionRange)value).IsMaxInclusive);
writer.WriteBoolean(PropName_HasLowerAndUpperBounds, ((global::NuGet.Versioning.VersionRange)value).HasLowerAndUpperBounds);
writer.WritePropertyName(PropName_Float);
FloatRangeSerializeHandler(writer, ((global::NuGet.Versioning.VersionRange)value).Float);
writer.WriteString(PropName_OriginalString, ((global::NuGet.Versioning.VersionRange)value).OriginalString);
writer.WriteEndObject();
}
}
}
|