|
// <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>
public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Backchannel.BackchannelLogEntry> BackchannelLogEntry
{
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,
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
};
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
};
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
};
properties[2] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info2);
properties[2].IsRequired = true;
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
};
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
};
properties[4] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info4);
properties[4].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 BackchannelLogEntrySerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Aspire.Cli.Backchannel.BackchannelLogEntry? value)
{
if (value == 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()
{
var parameters = new global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[5];
parameters[0] = new()
{
Name = "EventId",
ParameterType = typeof(global::Microsoft.Extensions.Logging.EventId),
Position = 0,
};
parameters[1] = new()
{
Name = "LogLevel",
ParameterType = typeof(global::Microsoft.Extensions.Logging.LogLevel),
Position = 1,
};
parameters[2] = new()
{
Name = "Message",
ParameterType = typeof(string),
Position = 2,
};
parameters[3] = new()
{
Name = "Timestamp",
ParameterType = typeof(global::System.DateTimeOffset),
Position = 3,
};
parameters[4] = new()
{
Name = "CategoryName",
ParameterType = typeof(string),
Position = 4,
};
return parameters;
}
}
}
|