|
// <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.Utils.EnvironmentChecker.ContainerClientJson>? _ContainerClientJson;
/// <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.Utils.EnvironmentChecker.ContainerClientJson> ContainerClientJson
#nullable enable annotations
{
get => _ContainerClientJson ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Utils.EnvironmentChecker.ContainerClientJson>)Options.GetTypeInfo(typeof(global::Aspire.Cli.Utils.EnvironmentChecker.ContainerClientJson));
}
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Utils.EnvironmentChecker.ContainerClientJson> Create_ContainerClientJson(global::System.Text.Json.JsonSerializerOptions options)
{
if (!TryGetTypeInfoForRuntimeCustomConverter<global::Aspire.Cli.Utils.EnvironmentChecker.ContainerClientJson>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Utils.EnvironmentChecker.ContainerClientJson> jsonTypeInfo))
{
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Aspire.Cli.Utils.EnvironmentChecker.ContainerClientJson>
{
ObjectCreator = () => new global::Aspire.Cli.Utils.EnvironmentChecker.ContainerClientJson(),
ObjectWithParameterizedConstructorCreator = null,
PropertyMetadataInitializer = _ => ContainerClientJsonPropInit(options),
ConstructorParameterMetadataInitializer = null,
ConstructorAttributeProviderFactory = static () => typeof(global::Aspire.Cli.Utils.EnvironmentChecker.ContainerClientJson).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null),
SerializeHandler = ContainerClientJsonSerializeHandler,
};
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Aspire.Cli.Utils.EnvironmentChecker.ContainerClientJson>(options, objectInfo);
jsonTypeInfo.NumberHandling = null;
}
jsonTypeInfo.OriginatingResolver = this;
return jsonTypeInfo;
}
private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] ContainerClientJsonPropInit(global::System.Text.Json.JsonSerializerOptions options)
{
var properties = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[2];
var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Cli.Utils.EnvironmentChecker.ContainerClientJson),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Utils.EnvironmentChecker.ContainerClientJson)obj).Version,
Setter = static (obj, value) => ((global::Aspire.Cli.Utils.EnvironmentChecker.ContainerClientJson)obj).Version = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Version",
JsonPropertyName = "Version",
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Utils.EnvironmentChecker.ContainerClientJson).GetProperty("Version", 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);
var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Cli.Utils.EnvironmentChecker.ContainerClientJson),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Utils.EnvironmentChecker.ContainerClientJson)obj).Context,
Setter = static (obj, value) => ((global::Aspire.Cli.Utils.EnvironmentChecker.ContainerClientJson)obj).Context = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Context",
JsonPropertyName = "Context",
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Utils.EnvironmentChecker.ContainerClientJson).GetProperty("Context", 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);
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 ContainerClientJsonSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Aspire.Cli.Utils.EnvironmentChecker.ContainerClientJson? value)
{
if (value is null)
{
writer.WriteNullValue();
return;
}
writer.WriteStartObject();
string __value_Version = ((global::Aspire.Cli.Utils.EnvironmentChecker.ContainerClientJson)value).Version;
if (__value_Version is not null)
{
writer.WriteString(PropName_Version, __value_Version);
}
string __value_Context = ((global::Aspire.Cli.Utils.EnvironmentChecker.ContainerClientJson)value).Context;
if (__value_Context is not null)
{
writer.WriteString(PropName_Context, __value_Context);
}
writer.WriteEndObject();
}
}
}
|