|
// <auto-generated/>
#nullable enable annotations
#nullable disable warnings
// Suppress warnings about [Obsolete] member usage in generated code.
#pragma warning disable CS0612, CS0618
namespace Aspire.Cli.Backchannel
{
internal partial class BackchannelJsonSerializerContext
{
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Commands.Sdk.TypeRefInfo>? _TypeRefInfo;
/// <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::Aspire.Cli.Commands.Sdk.TypeRefInfo> TypeRefInfo
#nullable enable annotations
{
get => _TypeRefInfo ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Commands.Sdk.TypeRefInfo>)Options.GetTypeInfo(typeof(global::Aspire.Cli.Commands.Sdk.TypeRefInfo));
}
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Commands.Sdk.TypeRefInfo> Create_TypeRefInfo(global::System.Text.Json.JsonSerializerOptions options)
{
if (!TryGetTypeInfoForRuntimeCustomConverter<global::Aspire.Cli.Commands.Sdk.TypeRefInfo>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Commands.Sdk.TypeRefInfo> jsonTypeInfo))
{
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Aspire.Cli.Commands.Sdk.TypeRefInfo>
{
ObjectCreator = () => new global::Aspire.Cli.Commands.Sdk.TypeRefInfo(),
ObjectWithParameterizedConstructorCreator = null,
PropertyMetadataInitializer = _ => TypeRefInfoPropInit(options),
ConstructorParameterMetadataInitializer = null,
ConstructorAttributeProviderFactory = static () => typeof(global::Aspire.Cli.Commands.Sdk.TypeRefInfo).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null),
SerializeHandler = TypeRefInfoSerializeHandler,
};
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Aspire.Cli.Commands.Sdk.TypeRefInfo>(options, objectInfo);
jsonTypeInfo.NumberHandling = null;
}
jsonTypeInfo.OriginatingResolver = this;
return jsonTypeInfo;
}
private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] TypeRefInfoPropInit(global::System.Text.Json.JsonSerializerOptions options)
{
var properties = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[8];
var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Cli.Commands.Sdk.TypeRefInfo),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Commands.Sdk.TypeRefInfo)obj).TypeId,
Setter = static (obj, value) => ((global::Aspire.Cli.Commands.Sdk.TypeRefInfo)obj).TypeId = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "TypeId",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Commands.Sdk.TypeRefInfo).GetProperty("TypeId", 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;
properties[0].IsSetNullable = false;
var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Cli.Commands.Sdk.TypeRefInfo),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Commands.Sdk.TypeRefInfo)obj).Category,
Setter = static (obj, value) => ((global::Aspire.Cli.Commands.Sdk.TypeRefInfo)obj).Category = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Category",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Commands.Sdk.TypeRefInfo).GetProperty("Category", 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;
properties[1].IsSetNullable = false;
var info2 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<bool>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Cli.Commands.Sdk.TypeRefInfo),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Commands.Sdk.TypeRefInfo)obj).IsInterface,
Setter = static (obj, value) => ((global::Aspire.Cli.Commands.Sdk.TypeRefInfo)obj).IsInterface = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "IsInterface",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Commands.Sdk.TypeRefInfo).GetProperty("IsInterface", 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<bool>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Cli.Commands.Sdk.TypeRefInfo),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Commands.Sdk.TypeRefInfo)obj).IsReadOnly,
Setter = static (obj, value) => ((global::Aspire.Cli.Commands.Sdk.TypeRefInfo)obj).IsReadOnly = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "IsReadOnly",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Commands.Sdk.TypeRefInfo).GetProperty("IsReadOnly", 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<global::Aspire.Cli.Commands.Sdk.TypeRefInfo>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Cli.Commands.Sdk.TypeRefInfo),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Commands.Sdk.TypeRefInfo)obj).ElementType,
Setter = static (obj, value) => ((global::Aspire.Cli.Commands.Sdk.TypeRefInfo)obj).ElementType = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "ElementType",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Commands.Sdk.TypeRefInfo).GetProperty("ElementType", InstanceMemberBindingFlags, null, typeof(global::Aspire.Cli.Commands.Sdk.TypeRefInfo), global::System.Array.Empty<global::System.Type>(), null),
};
properties[4] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Aspire.Cli.Commands.Sdk.TypeRefInfo>(options, info4);
var info5 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Aspire.Cli.Commands.Sdk.TypeRefInfo>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Cli.Commands.Sdk.TypeRefInfo),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Commands.Sdk.TypeRefInfo)obj).KeyType,
Setter = static (obj, value) => ((global::Aspire.Cli.Commands.Sdk.TypeRefInfo)obj).KeyType = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "KeyType",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Commands.Sdk.TypeRefInfo).GetProperty("KeyType", InstanceMemberBindingFlags, null, typeof(global::Aspire.Cli.Commands.Sdk.TypeRefInfo), global::System.Array.Empty<global::System.Type>(), null),
};
properties[5] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Aspire.Cli.Commands.Sdk.TypeRefInfo>(options, info5);
var info6 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Aspire.Cli.Commands.Sdk.TypeRefInfo>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Cli.Commands.Sdk.TypeRefInfo),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Commands.Sdk.TypeRefInfo)obj).ValueType,
Setter = static (obj, value) => ((global::Aspire.Cli.Commands.Sdk.TypeRefInfo)obj).ValueType = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "ValueType",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Commands.Sdk.TypeRefInfo).GetProperty("ValueType", InstanceMemberBindingFlags, null, typeof(global::Aspire.Cli.Commands.Sdk.TypeRefInfo), global::System.Array.Empty<global::System.Type>(), null),
};
properties[6] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Aspire.Cli.Commands.Sdk.TypeRefInfo>(options, info6);
var info7 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.List<global::Aspire.Cli.Commands.Sdk.TypeRefInfo>>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Cli.Commands.Sdk.TypeRefInfo),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Commands.Sdk.TypeRefInfo)obj).UnionTypes,
Setter = static (obj, value) => ((global::Aspire.Cli.Commands.Sdk.TypeRefInfo)obj).UnionTypes = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "UnionTypes",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Commands.Sdk.TypeRefInfo).GetProperty("UnionTypes", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.List<global::Aspire.Cli.Commands.Sdk.TypeRefInfo>), global::System.Array.Empty<global::System.Type>(), null),
};
properties[7] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.List<global::Aspire.Cli.Commands.Sdk.TypeRefInfo>>(options, info7);
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 TypeRefInfoSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Aspire.Cli.Commands.Sdk.TypeRefInfo? value)
{
if (value is null)
{
writer.WriteNullValue();
return;
}
writer.WriteStartObject();
writer.WriteString(PropName_TypeId, ((global::Aspire.Cli.Commands.Sdk.TypeRefInfo)value).TypeId);
writer.WriteString(PropName_Category, ((global::Aspire.Cli.Commands.Sdk.TypeRefInfo)value).Category);
writer.WriteBoolean(PropName_IsInterface, ((global::Aspire.Cli.Commands.Sdk.TypeRefInfo)value).IsInterface);
writer.WriteBoolean(PropName_IsReadOnly, ((global::Aspire.Cli.Commands.Sdk.TypeRefInfo)value).IsReadOnly);
writer.WritePropertyName(PropName_ElementType);
TypeRefInfoSerializeHandler(writer, ((global::Aspire.Cli.Commands.Sdk.TypeRefInfo)value).ElementType);
writer.WritePropertyName(PropName_KeyType);
TypeRefInfoSerializeHandler(writer, ((global::Aspire.Cli.Commands.Sdk.TypeRefInfo)value).KeyType);
writer.WritePropertyName(PropName_ValueType);
TypeRefInfoSerializeHandler(writer, ((global::Aspire.Cli.Commands.Sdk.TypeRefInfo)value).ValueType);
writer.WritePropertyName(PropName_UnionTypes);
ListTypeRefInfoSerializeHandler(writer, ((global::Aspire.Cli.Commands.Sdk.TypeRefInfo)value).UnionTypes);
writer.WriteEndObject();
}
}
}
|