|
// <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.CliSettings>? _CliSettings;
/// <summary>
/// Defines the source generated JSON serialization contract metadata for a given type.
/// </summary>
public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.CliSettings> CliSettings
{
get => _CliSettings ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.CliSettings>)Options.GetTypeInfo(typeof(global::Aspire.Cli.CliSettings));
}
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.CliSettings> Create_CliSettings(global::System.Text.Json.JsonSerializerOptions options)
{
if (!TryGetTypeInfoForRuntimeCustomConverter<global::Aspire.Cli.CliSettings>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.CliSettings> jsonTypeInfo))
{
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Aspire.Cli.CliSettings>
{
ObjectCreator = () => new global::Aspire.Cli.CliSettings(),
ObjectWithParameterizedConstructorCreator = null,
PropertyMetadataInitializer = _ => CliSettingsPropInit(options),
ConstructorParameterMetadataInitializer = null,
SerializeHandler = CliSettingsSerializeHandler
};
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Aspire.Cli.CliSettings>(options, objectInfo);
jsonTypeInfo.NumberHandling = null;
}
jsonTypeInfo.OriginatingResolver = this;
return jsonTypeInfo;
}
private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] CliSettingsPropInit(global::System.Text.Json.JsonSerializerOptions options)
{
var properties = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[1];
var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Cli.CliSettings),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.CliSettings)obj).AppHostPath,
Setter = static (obj, value) => ((global::Aspire.Cli.CliSettings)obj).AppHostPath = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "AppHostPath",
JsonPropertyName = "appHostPath"
};
properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info0);
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 CliSettingsSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Aspire.Cli.CliSettings? value)
{
if (value == null)
{
writer.WriteNullValue();
return;
}
writer.WriteStartObject();
writer.WriteString(PropName_appHostPath, ((global::Aspire.Cli.CliSettings)value).AppHostPath);
writer.WriteEndObject();
}
}
}
|