|
// <auto-generated/>
#nullable enable annotations
#nullable disable warnings
// Suppress warnings about [Obsolete] member usage in generated code.
#pragma warning disable CS0612, CS0618
namespace Microsoft.AspNetCore.Components.WebAssembly.Infrastructure
{
internal sealed partial class WebAssemblyJsonSerializerContext
{
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Components.RootComponentOperationBatch>? _RootComponentOperationBatch;
/// <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::Microsoft.AspNetCore.Components.RootComponentOperationBatch> RootComponentOperationBatch
#nullable enable annotations
{
get => _RootComponentOperationBatch ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Components.RootComponentOperationBatch>)Options.GetTypeInfo(typeof(global::Microsoft.AspNetCore.Components.RootComponentOperationBatch));
}
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Components.RootComponentOperationBatch> Create_RootComponentOperationBatch(global::System.Text.Json.JsonSerializerOptions options)
{
if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.AspNetCore.Components.RootComponentOperationBatch>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Components.RootComponentOperationBatch> jsonTypeInfo))
{
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.AspNetCore.Components.RootComponentOperationBatch>
{
ObjectCreator = null,
ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.AspNetCore.Components.RootComponentOperationBatch(){ Operations = (global::Microsoft.AspNetCore.Components.RootComponentOperation[])args[0] },
PropertyMetadataInitializer = _ => RootComponentOperationBatchPropInit(options),
ConstructorParameterMetadataInitializer = RootComponentOperationBatchCtorParamInit,
ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Components.RootComponentOperationBatch).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null),
SerializeHandler = RootComponentOperationBatchSerializeHandler,
};
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.AspNetCore.Components.RootComponentOperationBatch>(options, objectInfo);
jsonTypeInfo.NumberHandling = null;
}
jsonTypeInfo.OriginatingResolver = this;
return jsonTypeInfo;
}
private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] RootComponentOperationBatchPropInit(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<long>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.AspNetCore.Components.RootComponentOperationBatch),
Converter = null,
Getter = static obj => ((global::Microsoft.AspNetCore.Components.RootComponentOperationBatch)obj).BatchId,
Setter = static (obj, value) => ((global::Microsoft.AspNetCore.Components.RootComponentOperationBatch)obj).BatchId = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "BatchId",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Components.RootComponentOperationBatch).GetProperty("BatchId", InstanceMemberBindingFlags, null, typeof(long), global::System.Array.Empty<global::System.Type>(), null),
};
properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<long>(options, info0);
var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Microsoft.AspNetCore.Components.RootComponentOperation[]>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.AspNetCore.Components.RootComponentOperationBatch),
Converter = null,
Getter = static obj => ((global::Microsoft.AspNetCore.Components.RootComponentOperationBatch)obj).Operations,
Setter = static (obj, value) => ((global::Microsoft.AspNetCore.Components.RootComponentOperationBatch)obj).Operations = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Operations",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Components.RootComponentOperationBatch).GetProperty("Operations", InstanceMemberBindingFlags, null, typeof(global::Microsoft.AspNetCore.Components.RootComponentOperation[]), global::System.Array.Empty<global::System.Type>(), null),
};
properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Microsoft.AspNetCore.Components.RootComponentOperation[]>(options, info1);
properties[1].IsRequired = true;
properties[1].IsGetNullable = false;
properties[1].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 RootComponentOperationBatchSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.AspNetCore.Components.RootComponentOperationBatch? value)
{
if (value is null)
{
writer.WriteNullValue();
return;
}
writer.WriteStartObject();
writer.WriteNumber(PropName_batchId, ((global::Microsoft.AspNetCore.Components.RootComponentOperationBatch)value).BatchId);
global::Microsoft.AspNetCore.Components.RootComponentOperation[] __value_Operations = ((global::Microsoft.AspNetCore.Components.RootComponentOperationBatch)value).Operations;
if (__value_Operations is not null)
{
writer.WritePropertyName(PropName_operations);
RootComponentOperationArraySerializeHandler(writer, __value_Operations);
}
writer.WriteEndObject();
}
private static global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[] RootComponentOperationBatchCtorParamInit() => new global::System.Text.Json.Serialization.Metadata.JsonParameterInfoValues[]
{
new()
{
Name = "Operations",
ParameterType = typeof(global::Microsoft.AspNetCore.Components.RootComponentOperation[]),
Position = 0,
IsNullable = false,
IsMemberInitializer = true,
},
};
}
}
|