// <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
{
internal sealed partial class ServerComponentJsonContext
{
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Components.ServerComponent>? _ServerComponent;
/// <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.ServerComponent> ServerComponent
#nullable enable annotations
{
get => _ServerComponent ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Components.ServerComponent>)Options.GetTypeInfo(typeof(global::Microsoft.AspNetCore.Components.ServerComponent));
}
private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Components.ServerComponent> Create_ServerComponent(global::System.Text.Json.JsonSerializerOptions options)
{
if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.AspNetCore.Components.ServerComponent>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.AspNetCore.Components.ServerComponent> jsonTypeInfo))
{
var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.AspNetCore.Components.ServerComponent>
{
ObjectCreator = () => new global::Microsoft.AspNetCore.Components.ServerComponent(),
ObjectWithParameterizedConstructorCreator = null,
PropertyMetadataInitializer = _ => ServerComponentPropInit(options),
ConstructorParameterMetadataInitializer = null,
ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Components.ServerComponent).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null),
SerializeHandler = ServerComponentSerializeHandler,
PolymorphismOptions = new global::System.Text.Json.Serialization.Metadata.JsonPolymorphismOptions(),
TypeClassifierFactory = null,
};
jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.AspNetCore.Components.ServerComponent>(options, objectInfo);
jsonTypeInfo.NumberHandling = null;
}
jsonTypeInfo.OriginatingResolver = this;
return jsonTypeInfo;
}
private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] ServerComponentPropInit(global::System.Text.Json.JsonSerializerOptions options)
{
var properties = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[7];
var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<int>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.AspNetCore.Components.ServerComponent),
Converter = null,
Getter = static obj => ((global::Microsoft.AspNetCore.Components.ServerComponent)obj).Sequence,
Setter = static (obj, value) => global::System.Runtime.CompilerServices.Unsafe.Unbox<global::Microsoft.AspNetCore.Components.ServerComponent>(obj).Sequence = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Sequence",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Components.ServerComponent).GetProperty("Sequence", InstanceMemberBindingFlags, null, typeof(int), global::System.Array.Empty<global::System.Type>(), null),
};
properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<int>(options, info0);
var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::Microsoft.AspNetCore.Components.ComponentMarkerKey?>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.AspNetCore.Components.ServerComponent),
Converter = null,
Getter = static obj => ((global::Microsoft.AspNetCore.Components.ServerComponent)obj).Key,
Setter = static (obj, value) => global::System.Runtime.CompilerServices.Unsafe.Unbox<global::Microsoft.AspNetCore.Components.ServerComponent>(obj).Key = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "Key",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Components.ServerComponent).GetProperty("Key", InstanceMemberBindingFlags, null, typeof(global::Microsoft.AspNetCore.Components.ComponentMarkerKey?), global::System.Array.Empty<global::System.Type>(), null),
};
properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::Microsoft.AspNetCore.Components.ComponentMarkerKey?>(options, info1);
var info2 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.AspNetCore.Components.ServerComponent),
Converter = null,
Getter = static obj => ((global::Microsoft.AspNetCore.Components.ServerComponent)obj).AssemblyName,
Setter = static (obj, value) => global::System.Runtime.CompilerServices.Unsafe.Unbox<global::Microsoft.AspNetCore.Components.ServerComponent>(obj).AssemblyName = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "AssemblyName",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Components.ServerComponent).GetProperty("AssemblyName", 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].IsGetNullable = false;
properties[2].IsSetNullable = false;
var info3 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.AspNetCore.Components.ServerComponent),
Converter = null,
Getter = static obj => ((global::Microsoft.AspNetCore.Components.ServerComponent)obj).TypeName,
Setter = static (obj, value) => global::System.Runtime.CompilerServices.Unsafe.Unbox<global::Microsoft.AspNetCore.Components.ServerComponent>(obj).TypeName = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "TypeName",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Components.ServerComponent).GetProperty("TypeName", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
};
properties[3] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info3);
properties[3].IsGetNullable = false;
properties[3].IsSetNullable = false;
var info4 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.IList<global::Microsoft.AspNetCore.Components.ComponentParameter>>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.AspNetCore.Components.ServerComponent),
Converter = null,
Getter = static obj => ((global::Microsoft.AspNetCore.Components.ServerComponent)obj).ParameterDefinitions,
Setter = static (obj, value) => global::System.Runtime.CompilerServices.Unsafe.Unbox<global::Microsoft.AspNetCore.Components.ServerComponent>(obj).ParameterDefinitions = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "ParameterDefinitions",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Components.ServerComponent).GetProperty("ParameterDefinitions", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IList<global::Microsoft.AspNetCore.Components.ComponentParameter>), global::System.Array.Empty<global::System.Type>(), null),
};
properties[4] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.IList<global::Microsoft.AspNetCore.Components.ComponentParameter>>(options, info4);
properties[4].IsGetNullable = false;
properties[4].IsSetNullable = false;
var info5 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.IList<object>>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.AspNetCore.Components.ServerComponent),
Converter = null,
Getter = static obj => ((global::Microsoft.AspNetCore.Components.ServerComponent)obj).ParameterValues,
Setter = static (obj, value) => global::System.Runtime.CompilerServices.Unsafe.Unbox<global::Microsoft.AspNetCore.Components.ServerComponent>(obj).ParameterValues = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "ParameterValues",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Components.ServerComponent).GetProperty("ParameterValues", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IList<object>), global::System.Array.Empty<global::System.Type>(), null),
};
properties[5] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.IList<object>>(options, info5);
properties[5].IsGetNullable = false;
properties[5].IsSetNullable = false;
var info6 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Guid>
{
IsProperty = true,
IsPublic = true,
IsVirtual = false,
DeclaringType = typeof(global::Microsoft.AspNetCore.Components.ServerComponent),
Converter = null,
Getter = static obj => ((global::Microsoft.AspNetCore.Components.ServerComponent)obj).InvocationId,
Setter = static (obj, value) => global::System.Runtime.CompilerServices.Unsafe.Unbox<global::Microsoft.AspNetCore.Components.ServerComponent>(obj).InvocationId = value!,
IgnoreCondition = null,
HasJsonInclude = false,
IsExtensionData = false,
NumberHandling = null,
PropertyName = "InvocationId",
JsonPropertyName = null,
AttributeProviderFactory = static () => typeof(global::Microsoft.AspNetCore.Components.ServerComponent).GetProperty("InvocationId", InstanceMemberBindingFlags, null, typeof(global::System.Guid), global::System.Array.Empty<global::System.Type>(), null),
};
properties[6] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Guid>(options, info6);
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 ServerComponentSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Microsoft.AspNetCore.Components.ServerComponent value)
{
writer.WriteStartObject();
writer.WriteNumber(PropName_Sequence, ((global::Microsoft.AspNetCore.Components.ServerComponent)value).Sequence);
writer.WritePropertyName(PropName_Key);
global::System.Text.Json.JsonSerializer.Serialize(writer, ((global::Microsoft.AspNetCore.Components.ServerComponent)value).Key, NullableComponentMarkerKey);
writer.WriteString(PropName_AssemblyName, ((global::Microsoft.AspNetCore.Components.ServerComponent)value).AssemblyName);
writer.WriteString(PropName_TypeName, ((global::Microsoft.AspNetCore.Components.ServerComponent)value).TypeName);
writer.WritePropertyName(PropName_ParameterDefinitions);
IListComponentParameterSerializeHandler(writer, ((global::Microsoft.AspNetCore.Components.ServerComponent)value).ParameterDefinitions);
writer.WritePropertyName(PropName_ParameterValues);
global::System.Text.Json.JsonSerializer.Serialize(writer, ((global::Microsoft.AspNetCore.Components.ServerComponent)value).ParameterValues, IListObject);
writer.WriteString(PropName_InvocationId, ((global::Microsoft.AspNetCore.Components.ServerComponent)value).InvocationId);
writer.WriteEndObject();
}
}
}