|
// <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.AppHostProjectSearchResultPoco>? _AppHostProjectSearchResultPoco;
/// <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.Commands.AppHostProjectSearchResultPoco> AppHostProjectSearchResultPoco
{
get => _AppHostProjectSearchResultPoco ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Commands.AppHostProjectSearchResultPoco>)Options.GetTypeInfo(typeof(global::Aspire.Cli.Commands.AppHostProjectSearchResultPoco));
}
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Commands.AppHostProjectSearchResultPoco> Create_AppHostProjectSearchResultPoco(global::System.Text.Json.JsonSerializerOptions options)
{
if (!TryGetTypeInfoForRuntimeCustomConverter<global::Aspire.Cli.Commands.AppHostProjectSearchResultPoco>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Commands.AppHostProjectSearchResultPoco> jsonTypeInfo))
{
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Aspire.Cli.Commands.AppHostProjectSearchResultPoco>
{
ObjectCreator = null,
ObjectWithParameterizedConstructorCreator = static args => new global::Aspire.Cli.Commands.AppHostProjectSearchResultPoco(){ SelectedProjectFile = (string)args[0], AllProjectFileCandidates = (global::System.Collections.Generic.List<string>)args[1] },
PropertyMetadataInitializer = _ => AppHostProjectSearchResultPocoPropInit(options),
ConstructorParameterMetadataInitializer = AppHostProjectSearchResultPocoCtorParamInit,
SerializeHandler = AppHostProjectSearchResultPocoSerializeHandler
};
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Aspire.Cli.Commands.AppHostProjectSearchResultPoco>(options, objectInfo);
jsonTypeInfo.NumberHandling = null;
}
jsonTypeInfo.OriginatingResolver = this;
return jsonTypeInfo;
}
private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] AppHostProjectSearchResultPocoPropInit(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.Commands.AppHostProjectSearchResultPoco),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Commands.AppHostProjectSearchResultPoco)obj).SelectedProjectFile,
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 = "SelectedProjectFile",
JsonPropertyName = "selected_project_file"
};
properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info0);
var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.List<string>>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Cli.Commands.AppHostProjectSearchResultPoco),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Commands.AppHostProjectSearchResultPoco)obj).AllProjectFileCandidates,
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 = "AllProjectFileCandidates",
JsonPropertyName = "all_project_file_candidates"
};
properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.List<string>>(options, info1);
properties[1].IsRequired = true;
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 AppHostProjectSearchResultPocoSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Aspire.Cli.Commands.AppHostProjectSearchResultPoco? value)
{
if (value == null)
{
writer.WriteNullValue();
return;
}
writer.WriteStartObject();
writer.WriteString(PropName_selected_project_file, ((global::Aspire.Cli.Commands.AppHostProjectSearchResultPoco)value).SelectedProjectFile);
writer.WritePropertyName(PropName_all_project_file_candidates);
ListStringSerializeHandler(writer, ((global::Aspire.Cli.Commands.AppHostProjectSearchResultPoco)value).AllProjectFileCandidates);
writer.WriteEndObject();
}
private static global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[] AppHostProjectSearchResultPocoCtorParamInit()
{
var parameters = new global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[2];
parameters[0] = new()
{
Name = "SelectedProjectFile",
ParameterType = typeof(string),
Position = 0,
};
parameters[1] = new()
{
Name = "AllProjectFileCandidates",
ParameterType = typeof(global::System.Collections.Generic.List<string>),
Position = 1,
};
return parameters;
}
}
}
|