|
// <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.Backchannel.BackchannelLogEntry>? _BackchannelLogEntry;
/// <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.Backchannel.BackchannelLogEntry> BackchannelLogEntry
#nullable enable annotations
{
get => _BackchannelLogEntry ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Backchannel.BackchannelLogEntry>)Options.GetTypeInfo(typeof(global::Aspire.Cli.Backchannel.BackchannelLogEntry));
}
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Backchannel.BackchannelLogEntry> Create_BackchannelLogEntry(global::System.Text.Json.JsonSerializerOptions options)
{
if (!TryGetTypeInfoForRuntimeCustomConverter<global::Aspire.Cli.Backchannel.BackchannelLogEntry>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Backchannel.BackchannelLogEntry> jsonTypeInfo))
{
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Aspire.Cli.Backchannel.BackchannelLogEntry>
{
ObjectCreator = null,
ObjectWithParameterizedConstructorCreator = static args => new global::Aspire.Cli.Backchannel.BackchannelLogEntry(){ EventId = (global::Microsoft.Extensions.Logging.EventId)args[0], LogLevel = (global::Microsoft.Extensions.Logging.LogLevel)args[1], Message = (string)args[2], Timestamp = (global::System.DateTimeOffset)args[3], CategoryName = (string)args[4] },
PropertyMetadataInitializer = _ => BackchannelLogEntryPropInit(options),
ConstructorParameterMetadataInitializer = BackchannelLogEntryCtorParamInit,
ConstructorAttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.BackchannelLogEntry).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null),
SerializeHandler = BackchannelLogEntrySerializeHandler,
};
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Aspire.Cli.Backchannel.BackchannelLogEntry>(options, objectInfo);
jsonTypeInfo.NumberHandling = null;
}
jsonTypeInfo.OriginatingResolver = this;
return jsonTypeInfo;
}
private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] BackchannelLogEntryPropInit(global::System.Text.Json.JsonSerializerOptions options)
{
var properties = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[5];
var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Microsoft.Extensions.Logging.EventId>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Cli.Backchannel.BackchannelLogEntry),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Backchannel.BackchannelLogEntry)obj).EventId,
Setter = static (obj, value) => ((global::Aspire.Cli.Backchannel.BackchannelLogEntry)obj).EventId = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "EventId",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.BackchannelLogEntry).GetProperty("EventId", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.Logging.EventId), global::System.Array.Empty<global::System.Type>(), null),
};
properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Microsoft.Extensions.Logging.EventId>(options, info0);
properties[0].IsRequired = true;
var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Microsoft.Extensions.Logging.LogLevel>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Cli.Backchannel.BackchannelLogEntry),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Backchannel.BackchannelLogEntry)obj).LogLevel,
Setter = static (obj, value) => ((global::Aspire.Cli.Backchannel.BackchannelLogEntry)obj).LogLevel = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "LogLevel",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.BackchannelLogEntry).GetProperty("LogLevel", InstanceMemberBindingFlags, null, typeof(global::Microsoft.Extensions.Logging.LogLevel), global::System.Array.Empty<global::System.Type>(), null),
};
properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Microsoft.Extensions.Logging.LogLevel>(options, info1);
properties[1].IsRequired = true;
var info2 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Cli.Backchannel.BackchannelLogEntry),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Backchannel.BackchannelLogEntry)obj).Message,
Setter = static (obj, value) => ((global::Aspire.Cli.Backchannel.BackchannelLogEntry)obj).Message = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Message",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.BackchannelLogEntry).GetProperty("Message", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
};
properties[2] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info2);
properties[2].IsRequired = true;
properties[2].IsGetNullable = false;
properties[2].IsSetNullable = false;
var info3 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.DateTimeOffset>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Cli.Backchannel.BackchannelLogEntry),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Backchannel.BackchannelLogEntry)obj).Timestamp,
Setter = static (obj, value) => ((global::Aspire.Cli.Backchannel.BackchannelLogEntry)obj).Timestamp = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Timestamp",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.BackchannelLogEntry).GetProperty("Timestamp", InstanceMemberBindingFlags, null, typeof(global::System.DateTimeOffset), global::System.Array.Empty<global::System.Type>(), null),
};
properties[3] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.DateTimeOffset>(options, info3);
properties[3].IsRequired = true;
var info4 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Aspire.Cli.Backchannel.BackchannelLogEntry),
Converter = null,
Getter = static obj => ((global::Aspire.Cli.Backchannel.BackchannelLogEntry)obj).CategoryName,
Setter = static (obj, value) => ((global::Aspire.Cli.Backchannel.BackchannelLogEntry)obj).CategoryName = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "CategoryName",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.BackchannelLogEntry).GetProperty("CategoryName", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
};
properties[4] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info4);
properties[4].IsRequired = true;
properties[4].IsGetNullable = false;
properties[4].IsSetNullable = false;
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 BackchannelLogEntrySerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Aspire.Cli.Backchannel.BackchannelLogEntry? value)
{
if (value is null)
{
writer.WriteNullValue();
return;
}
writer.WriteStartObject();
writer.WritePropertyName(PropName_EventId);
EventIdSerializeHandler(writer, ((global::Aspire.Cli.Backchannel.BackchannelLogEntry)value).EventId);
writer.WritePropertyName(PropName_LogLevel);
global::System.Text.Json.JsonSerializer.Serialize(writer, ((global::Aspire.Cli.Backchannel.BackchannelLogEntry)value).LogLevel, LogLevel);
writer.WriteString(PropName_Message, ((global::Aspire.Cli.Backchannel.BackchannelLogEntry)value).Message);
writer.WriteString(PropName_Timestamp, ((global::Aspire.Cli.Backchannel.BackchannelLogEntry)value).Timestamp);
writer.WriteString(PropName_CategoryName, ((global::Aspire.Cli.Backchannel.BackchannelLogEntry)value).CategoryName);
writer.WriteEndObject();
}
private static global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[] BackchannelLogEntryCtorParamInit() => new global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[]
{
new()
{
Name = "EventId",
ParameterType = typeof(global::Microsoft.Extensions.Logging.EventId),
Position = 0,
IsNullable = false,
IsMemberInitializer = true,
},
new()
{
Name = "LogLevel",
ParameterType = typeof(global::Microsoft.Extensions.Logging.LogLevel),
Position = 1,
IsNullable = false,
IsMemberInitializer = true,
},
new()
{
Name = "Message",
ParameterType = typeof(string),
Position = 2,
IsNullable = false,
IsMemberInitializer = true,
},
new()
{
Name = "Timestamp",
ParameterType = typeof(global::System.DateTimeOffset),
Position = 3,
IsNullable = false,
IsMemberInitializer = true,
},
new()
{
Name = "CategoryName",
ParameterType = typeof(string),
Position = 4,
IsNullable = false,
IsMemberInitializer = true,
},
};
}
}
|