|
// <auto-generated/>
#nullable enable annotations
#nullable disable warnings
// Suppress warnings about [Obsolete] member usage in generated code.
#pragma warning disable CS0612, CS0618
namespace Aspire.Hosting
{
internal sealed partial class LaunchSettingsSerializerContext
{
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Hosting.LaunchSettings>? _LaunchSettings;
/// <summary>
/// Defines the source generated JSON serialization contract metadata for a given type.
/// </summary>
public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Hosting.LaunchSettings> LaunchSettings
{
get => _LaunchSettings ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Hosting.LaunchSettings>)Options.GetTypeInfo(typeof(global::Aspire.Hosting.LaunchSettings));
}
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Hosting.LaunchSettings> Create_LaunchSettings(global::System.Text.Json.JsonSerializerOptions options)
{
if (!TryGetTypeInfoForRuntimeCustomConverter<global::Aspire.Hosting.LaunchSettings>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Hosting.LaunchSettings> jsonTypeInfo))
{
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Aspire.Hosting.LaunchSettings>
{
ObjectCreator = () => new global::Aspire.Hosting.LaunchSettings(),
ObjectWithParameterizedConstructorCreator = null,
PropertyMetadataInitializer = _ => LaunchSettingsPropInit(options),
ConstructorParameterMetadataInitializer = null,
SerializeHandler = LaunchSettingsSerializeHandler
};
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Aspire.Hosting.LaunchSettings>(options, objectInfo);
jsonTypeInfo.NumberHandling = null;
}
jsonTypeInfo.OriginatingResolver = this;
return jsonTypeInfo;
}
private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] LaunchSettingsPropInit(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<global::System.Collections.Generic.Dictionary<string, global::Aspire.Hosting.LaunchProfile>>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Hosting.LaunchSettings),
Converter = null,
Getter = static obj => ((global::Aspire.Hosting.LaunchSettings)obj).Profiles,
Setter = static (obj, value) => ((global::Aspire.Hosting.LaunchSettings)obj).Profiles = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Profiles",
JsonPropertyName = "profiles"
};
properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.Dictionary<string, global::Aspire.Hosting.LaunchProfile>>(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 LaunchSettingsSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Aspire.Hosting.LaunchSettings? value)
{
if (value == null)
{
writer.WriteNullValue();
return;
}
writer.WriteStartObject();
writer.WritePropertyName(PropName_profiles);
DictionaryStringLaunchProfileSerializeHandler(writer, ((global::Aspire.Hosting.LaunchSettings)value).Profiles);
writer.WriteEndObject();
}
}
}
|