|
// <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
{
internal partial class JsonSourceGenerationContext
{
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Commands.ConfigInfo>? _ConfigInfo;
/// <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.ConfigInfo> ConfigInfo
#nullable enable annotations
{
get => _ConfigInfo ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Commands.ConfigInfo>)Options.GetTypeInfo(typeof(global::Aspire.Cli.Commands.ConfigInfo));
}
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Commands.ConfigInfo> Create_ConfigInfo(global::System.Text.Json.JsonSerializerOptions options)
{
if (!TryGetTypeInfoForRuntimeCustomConverter<global::Aspire.Cli.Commands.ConfigInfo>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Commands.ConfigInfo> jsonTypeInfo))
{
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Aspire.Cli.Commands.ConfigInfo>
{
ObjectCreator = null,
ObjectWithParameterizedConstructorCreator = static args => new global::Aspire.Cli.Commands.ConfigInfo((string)args[0], (string)args[1], (global::System.Collections.Generic.List<global::Aspire.Cli.Commands.FeatureInfo>)args[2], (global::Aspire.Cli.Commands.SettingsSchema)args[3], (global::Aspire.Cli.Commands.SettingsSchema)args[4]),
PropertyMetadataInitializer = _ => ConfigInfoPropInit(options),
ConstructorParameterMetadataInitializer = ConfigInfoCtorParamInit,
ConstructorAttributeProviderFactory = static () => typeof(global::Aspire.Cli.Commands.ConfigInfo).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(string), typeof(string), typeof(global::System.Collections.Generic.List<global::Aspire.Cli.Commands.FeatureInfo>), typeof(global::Aspire.Cli.Commands.SettingsSchema), typeof(global::Aspire.Cli.Commands.SettingsSchema)}, modifiers: null),
SerializeHandler = ConfigInfoSerializeHandler,
};
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Aspire.Cli.Commands.ConfigInfo>(options, objectInfo);
jsonTypeInfo.NumberHandling = null;
}
jsonTypeInfo.OriginatingResolver = this;
return jsonTypeInfo;
}
private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] ConfigInfoPropInit(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<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Cli.Commands.ConfigInfo),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Commands.ConfigInfo)obj).LocalSettingsPath,
Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."),
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "LocalSettingsPath",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Commands.ConfigInfo).GetProperty("LocalSettingsPath", 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.ConfigInfo),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Commands.ConfigInfo)obj).GlobalSettingsPath,
Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."),
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "GlobalSettingsPath",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Commands.ConfigInfo).GetProperty("GlobalSettingsPath", 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<global::System.Collections.Generic.List<global::Aspire.Cli.Commands.FeatureInfo>>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Cli.Commands.ConfigInfo),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Commands.ConfigInfo)obj).AvailableFeatures,
Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."),
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "AvailableFeatures",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Commands.ConfigInfo).GetProperty("AvailableFeatures", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.List<global::Aspire.Cli.Commands.FeatureInfo>), global::System.Array.Empty<global::System.Type>(), null),
};
properties[2] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.List<global::Aspire.Cli.Commands.FeatureInfo>>(options, info2);
properties[2].IsGetNullable = false;
properties[2].IsSetNullable = false;
var info3 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Aspire.Cli.Commands.SettingsSchema>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Cli.Commands.ConfigInfo),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Commands.ConfigInfo)obj).LocalSettingsSchema,
Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."),
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "LocalSettingsSchema",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Commands.ConfigInfo).GetProperty("LocalSettingsSchema", InstanceMemberBindingFlags, null, typeof(global::Aspire.Cli.Commands.SettingsSchema), global::System.Array.Empty<global::System.Type>(), null),
};
properties[3] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Aspire.Cli.Commands.SettingsSchema>(options, info3);
properties[3].IsGetNullable = false;
properties[3].IsSetNullable = false;
var info4 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Aspire.Cli.Commands.SettingsSchema>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Cli.Commands.ConfigInfo),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Commands.ConfigInfo)obj).GlobalSettingsSchema,
Setter = static (obj, value) => throw new global::System.InvalidOperationException("Setting init-only properties is not supported in source generation mode."),
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "GlobalSettingsSchema",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Commands.ConfigInfo).GetProperty("GlobalSettingsSchema", InstanceMemberBindingFlags, null, typeof(global::Aspire.Cli.Commands.SettingsSchema), global::System.Array.Empty<global::System.Type>(), null),
};
properties[4] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Aspire.Cli.Commands.SettingsSchema>(options, info4);
properties[4].IsGetNullable = false;
properties[4].IsSetNullable = false;
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 ConfigInfoSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Aspire.Cli.Commands.ConfigInfo? value)
{
if (value is null)
{
writer.WriteNullValue();
return;
}
writer.WriteStartObject();
string __value_LocalSettingsPath = ((global::Aspire.Cli.Commands.ConfigInfo)value).LocalSettingsPath;
if (__value_LocalSettingsPath is not null)
{
writer.WriteString(PropName_LocalSettingsPath, __value_LocalSettingsPath);
}
string __value_GlobalSettingsPath = ((global::Aspire.Cli.Commands.ConfigInfo)value).GlobalSettingsPath;
if (__value_GlobalSettingsPath is not null)
{
writer.WriteString(PropName_GlobalSettingsPath, __value_GlobalSettingsPath);
}
global::System.Collections.Generic.List<global::Aspire.Cli.Commands.FeatureInfo> __value_AvailableFeatures = ((global::Aspire.Cli.Commands.ConfigInfo)value).AvailableFeatures;
if (__value_AvailableFeatures is not null)
{
writer.WritePropertyName(PropName_AvailableFeatures);
ListFeatureInfoSerializeHandler(writer, __value_AvailableFeatures);
}
global::Aspire.Cli.Commands.SettingsSchema __value_LocalSettingsSchema = ((global::Aspire.Cli.Commands.ConfigInfo)value).LocalSettingsSchema;
if (__value_LocalSettingsSchema is not null)
{
writer.WritePropertyName(PropName_LocalSettingsSchema);
SettingsSchemaSerializeHandler(writer, __value_LocalSettingsSchema);
}
global::Aspire.Cli.Commands.SettingsSchema __value_GlobalSettingsSchema = ((global::Aspire.Cli.Commands.ConfigInfo)value).GlobalSettingsSchema;
if (__value_GlobalSettingsSchema is not null)
{
writer.WritePropertyName(PropName_GlobalSettingsSchema);
SettingsSchemaSerializeHandler(writer, __value_GlobalSettingsSchema);
}
writer.WriteEndObject();
}
private static global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[] ConfigInfoCtorParamInit() => new global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[]
{
new()
{
Name = "LocalSettingsPath",
ParameterType = typeof(string),
Position = 0,
HasDefaultValue = false,
DefaultValue = null,
IsNullable = false,
},
new()
{
Name = "GlobalSettingsPath",
ParameterType = typeof(string),
Position = 1,
HasDefaultValue = false,
DefaultValue = null,
IsNullable = false,
},
new()
{
Name = "AvailableFeatures",
ParameterType = typeof(global::System.Collections.Generic.List<global::Aspire.Cli.Commands.FeatureInfo>),
Position = 2,
HasDefaultValue = false,
DefaultValue = null,
IsNullable = false,
},
new()
{
Name = "LocalSettingsSchema",
ParameterType = typeof(global::Aspire.Cli.Commands.SettingsSchema),
Position = 3,
HasDefaultValue = false,
DefaultValue = null,
IsNullable = false,
},
new()
{
Name = "GlobalSettingsSchema",
ParameterType = typeof(global::Aspire.Cli.Commands.SettingsSchema),
Position = 4,
HasDefaultValue = false,
DefaultValue = null,
IsNullable = false,
},
};
}
}
|