|
// <auto-generated/>
#nullable enable annotations
#nullable disable warnings
// Suppress warnings about [Obsolete] member usage in generated code.
#pragma warning disable CS0612, CS0618
namespace Aspire.Dashboard.Otlp.Model.Serialization
{
internal sealed partial class OtlpJsonSerializerContext
{
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Dashboard.Otlp.Model.Serialization.OtlpKeyValueListJson>? _OtlpKeyValueListJson;
/// <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.Dashboard.Otlp.Model.Serialization.OtlpKeyValueListJson> OtlpKeyValueListJson
#nullable enable annotations
{
get => _OtlpKeyValueListJson ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Dashboard.Otlp.Model.Serialization.OtlpKeyValueListJson>)Options.GetTypeInfo(typeof(global::Aspire.Dashboard.Otlp.Model.Serialization.OtlpKeyValueListJson));
}
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Dashboard.Otlp.Model.Serialization.OtlpKeyValueListJson> Create_OtlpKeyValueListJson(global::System.Text.Json.JsonSerializerOptions options)
{
if (!TryGetTypeInfoForRuntimeCustomConverter<global::Aspire.Dashboard.Otlp.Model.Serialization.OtlpKeyValueListJson>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Dashboard.Otlp.Model.Serialization.OtlpKeyValueListJson> jsonTypeInfo))
{
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Aspire.Dashboard.Otlp.Model.Serialization.OtlpKeyValueListJson>
{
ObjectCreator = () => new global::Aspire.Dashboard.Otlp.Model.Serialization.OtlpKeyValueListJson(),
ObjectWithParameterizedConstructorCreator = null,
PropertyMetadataInitializer = _ => OtlpKeyValueListJsonPropInit(options),
ConstructorParameterMetadataInitializer = null,
ConstructorAttributeProviderFactory = static () => typeof(global::Aspire.Dashboard.Otlp.Model.Serialization.OtlpKeyValueListJson).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null),
SerializeHandler = OtlpKeyValueListJsonSerializeHandler,
};
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Aspire.Dashboard.Otlp.Model.Serialization.OtlpKeyValueListJson>(options, objectInfo);
jsonTypeInfo.NumberHandling = null;
}
jsonTypeInfo.OriginatingResolver = this;
return jsonTypeInfo;
}
private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] OtlpKeyValueListJsonPropInit(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::Aspire.Dashboard.Otlp.Model.Serialization.OtlpKeyValueJson[]>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Dashboard.Otlp.Model.Serialization.OtlpKeyValueListJson),
Converter = null,
Getter = static obj => ((global::Aspire.Dashboard.Otlp.Model.Serialization.OtlpKeyValueListJson)obj).Values,
Setter = static (obj, value) => ((global::Aspire.Dashboard.Otlp.Model.Serialization.OtlpKeyValueListJson)obj).Values = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Values",
JsonPropertyName = "values",
AttributeProviderFactory = static () => typeof(global::Aspire.Dashboard.Otlp.Model.Serialization.OtlpKeyValueListJson).GetProperty("Values", InstanceMemberBindingFlags, null, typeof(global::Aspire.Dashboard.Otlp.Model.Serialization.OtlpKeyValueJson[]), global::System.Array.Empty<global::System.Type>(), null),
};
properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Aspire.Dashboard.Otlp.Model.Serialization.OtlpKeyValueJson[]>(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 OtlpKeyValueListJsonSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Aspire.Dashboard.Otlp.Model.Serialization.OtlpKeyValueListJson? value)
{
if (value is null)
{
writer.WriteNullValue();
return;
}
writer.WriteStartObject();
global::Aspire.Dashboard.Otlp.Model.Serialization.OtlpKeyValueJson[] __value_Values = ((global::Aspire.Dashboard.Otlp.Model.Serialization.OtlpKeyValueListJson)value).Values;
if (__value_Values is not null)
{
writer.WritePropertyName(PropName_values);
OtlpKeyValueJsonArraySerializeHandler(writer, __value_Values);
}
writer.WriteEndObject();
}
}
}
|