// <auto-generated/> #nullable enable annotations #nullable disable warnings // Suppress warnings about [Obsolete] member usage in generated code. #pragma warning disable CS0612, CS0618 namespace Microsoft.Extensions.AI.JsonSchemaExporter { public static partial class TestTypes { public partial class TestTypesContext { private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Xml.Linq.XElement>? _XElement; /// <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::System.Xml.Linq.XElement> XElement #nullable enable annotations { get => _XElement ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Xml.Linq.XElement>)Options.GetTypeInfo(typeof(global::System.Xml.Linq.XElement)); } private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Xml.Linq.XElement> Create_XElement(global::System.Text.Json.JsonSerializerOptions options) { if (!TryGetTypeInfoForRuntimeCustomConverter<global::System.Xml.Linq.XElement>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Xml.Linq.XElement> jsonTypeInfo)) { var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::System.Xml.Linq.XElement> { ObjectCreator = null, ObjectWithParameterizedConstructorCreator = null, PropertyMetadataInitializer = _ => XElementPropInit(options), ConstructorParameterMetadataInitializer = null, ConstructorAttributeProviderFactory = null, SerializeHandler = XElementSerializeHandler, }; jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::System.Xml.Linq.XElement>(options, objectInfo); jsonTypeInfo.NumberHandling = null; } jsonTypeInfo.OriginatingResolver = this; return jsonTypeInfo; } private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] XElementPropInit(global::System.Text.Json.JsonSerializerOptions options) { var properties = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[16]; var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Xml.Linq.XAttribute> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::System.Xml.Linq.XElement), Converter = null, Getter = static obj => ((global::System.Xml.Linq.XElement)obj).FirstAttribute, Setter = null, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "FirstAttribute", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::System.Xml.Linq.XElement).GetProperty("FirstAttribute", InstanceMemberBindingFlags, null, typeof(global::System.Xml.Linq.XAttribute), global::System.Array.Empty<global::System.Type>(), null), }; properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Xml.Linq.XAttribute>(options, info0); var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<bool> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::System.Xml.Linq.XElement), Converter = null, Getter = static obj => ((global::System.Xml.Linq.XElement)obj).HasAttributes, Setter = null, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "HasAttributes", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::System.Xml.Linq.XElement).GetProperty("HasAttributes", InstanceMemberBindingFlags, null, typeof(bool), global::System.Array.Empty<global::System.Type>(), null), }; properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<bool>(options, info1); var info2 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<bool> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::System.Xml.Linq.XElement), Converter = null, Getter = static obj => ((global::System.Xml.Linq.XElement)obj).HasElements, Setter = null, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "HasElements", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::System.Xml.Linq.XElement).GetProperty("HasElements", InstanceMemberBindingFlags, null, typeof(bool), global::System.Array.Empty<global::System.Type>(), null), }; properties[2] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<bool>(options, info2); var info3 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<bool> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::System.Xml.Linq.XElement), Converter = null, Getter = static obj => ((global::System.Xml.Linq.XElement)obj).IsEmpty, Setter = null, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "IsEmpty", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::System.Xml.Linq.XElement).GetProperty("IsEmpty", InstanceMemberBindingFlags, null, typeof(bool), global::System.Array.Empty<global::System.Type>(), null), }; properties[3] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<bool>(options, info3); var info4 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Xml.Linq.XAttribute> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::System.Xml.Linq.XElement), Converter = null, Getter = static obj => ((global::System.Xml.Linq.XElement)obj).LastAttribute, Setter = null, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "LastAttribute", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::System.Xml.Linq.XElement).GetProperty("LastAttribute", InstanceMemberBindingFlags, null, typeof(global::System.Xml.Linq.XAttribute), global::System.Array.Empty<global::System.Type>(), null), }; properties[4] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Xml.Linq.XAttribute>(options, info4); var info5 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Xml.Linq.XName> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::System.Xml.Linq.XElement), Converter = null, Getter = static obj => ((global::System.Xml.Linq.XElement)obj).Name, Setter = static (obj, value) => ((global::System.Xml.Linq.XElement)obj).Name = value!, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "Name", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::System.Xml.Linq.XElement).GetProperty("Name", InstanceMemberBindingFlags, null, typeof(global::System.Xml.Linq.XName), global::System.Array.Empty<global::System.Type>(), null), }; properties[5] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Xml.Linq.XName>(options, info5); var info6 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Xml.XmlNodeType> { IsProperty = true, IsPublic = true, IsVirtual = true, DeclaringType = typeof(global::System.Xml.Linq.XElement), Converter = null, Getter = static obj => ((global::System.Xml.Linq.XElement)obj).NodeType, Setter = null, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "NodeType", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::System.Xml.Linq.XElement).GetProperty("NodeType", InstanceMemberBindingFlags, null, typeof(global::System.Xml.XmlNodeType), global::System.Array.Empty<global::System.Type>(), null), }; properties[6] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Xml.XmlNodeType>(options, info6); var info7 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::System.Xml.Linq.XElement), Converter = null, Getter = static obj => ((global::System.Xml.Linq.XElement)obj).Value, Setter = static (obj, value) => ((global::System.Xml.Linq.XElement)obj).Value = value!, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "Value", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::System.Xml.Linq.XElement).GetProperty("Value", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null), }; properties[7] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info7); var info8 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Xml.Linq.XNode> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::System.Xml.Linq.XContainer), Converter = null, Getter = static obj => ((global::System.Xml.Linq.XContainer)obj).FirstNode, Setter = null, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "FirstNode", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::System.Xml.Linq.XContainer).GetProperty("FirstNode", InstanceMemberBindingFlags, null, typeof(global::System.Xml.Linq.XNode), global::System.Array.Empty<global::System.Type>(), null), }; properties[8] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Xml.Linq.XNode>(options, info8); var info9 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Xml.Linq.XNode> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::System.Xml.Linq.XContainer), Converter = null, Getter = static obj => ((global::System.Xml.Linq.XContainer)obj).LastNode, Setter = null, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "LastNode", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::System.Xml.Linq.XContainer).GetProperty("LastNode", InstanceMemberBindingFlags, null, typeof(global::System.Xml.Linq.XNode), global::System.Array.Empty<global::System.Type>(), null), }; properties[9] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Xml.Linq.XNode>(options, info9); var info10 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Xml.Linq.XNode> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::System.Xml.Linq.XNode), Converter = null, Getter = static obj => ((global::System.Xml.Linq.XNode)obj).NextNode, Setter = null, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "NextNode", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::System.Xml.Linq.XNode).GetProperty("NextNode", InstanceMemberBindingFlags, null, typeof(global::System.Xml.Linq.XNode), global::System.Array.Empty<global::System.Type>(), null), }; properties[10] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Xml.Linq.XNode>(options, info10); var info11 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Xml.Linq.XNode> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::System.Xml.Linq.XNode), Converter = null, Getter = static obj => ((global::System.Xml.Linq.XNode)obj).PreviousNode, Setter = null, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "PreviousNode", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::System.Xml.Linq.XNode).GetProperty("PreviousNode", InstanceMemberBindingFlags, null, typeof(global::System.Xml.Linq.XNode), global::System.Array.Empty<global::System.Type>(), null), }; properties[11] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Xml.Linq.XNode>(options, info11); var info12 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<string> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::System.Xml.Linq.XObject), Converter = null, Getter = static obj => ((global::System.Xml.Linq.XObject)obj).BaseUri, Setter = null, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "BaseUri", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::System.Xml.Linq.XObject).GetProperty("BaseUri", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null), }; properties[12] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info12); var info13 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Xml.Linq.XDocument> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::System.Xml.Linq.XObject), Converter = null, Getter = static obj => ((global::System.Xml.Linq.XObject)obj).Document, Setter = null, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "Document", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::System.Xml.Linq.XObject).GetProperty("Document", InstanceMemberBindingFlags, null, typeof(global::System.Xml.Linq.XDocument), global::System.Array.Empty<global::System.Type>(), null), }; properties[13] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Xml.Linq.XDocument>(options, info13); var info14 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Xml.XmlNodeType> { IsProperty = true, IsPublic = true, IsVirtual = true, DeclaringType = typeof(global::System.Xml.Linq.XObject), Converter = null, Getter = static obj => ((global::System.Xml.Linq.XObject)obj).NodeType, Setter = null, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "NodeType", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::System.Xml.Linq.XObject).GetProperty("NodeType", InstanceMemberBindingFlags, null, typeof(global::System.Xml.XmlNodeType), global::System.Array.Empty<global::System.Type>(), null), }; properties[14] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Xml.XmlNodeType>(options, info14); var info15 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Xml.Linq.XElement> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::System.Xml.Linq.XObject), Converter = null, Getter = static obj => ((global::System.Xml.Linq.XObject)obj).Parent, Setter = null, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "Parent", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::System.Xml.Linq.XObject).GetProperty("Parent", InstanceMemberBindingFlags, null, typeof(global::System.Xml.Linq.XElement), global::System.Array.Empty<global::System.Type>(), null), }; properties[15] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Xml.Linq.XElement>(options, info15); 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 XElementSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::System.Xml.Linq.XElement? value) { if (value is null) { writer.WriteNullValue(); return; } writer.WriteStartObject(); writer.WritePropertyName(PropName_FirstAttribute); XAttributeSerializeHandler(writer, ((global::System.Xml.Linq.XElement)value).FirstAttribute); writer.WriteBoolean(PropName_HasAttributes, ((global::System.Xml.Linq.XElement)value).HasAttributes); writer.WriteBoolean(PropName_HasElements, ((global::System.Xml.Linq.XElement)value).HasElements); writer.WriteBoolean(PropName_IsEmpty, ((global::System.Xml.Linq.XElement)value).IsEmpty); writer.WritePropertyName(PropName_LastAttribute); XAttributeSerializeHandler(writer, ((global::System.Xml.Linq.XElement)value).LastAttribute); writer.WritePropertyName(PropName_Name); XNameSerializeHandler(writer, ((global::System.Xml.Linq.XElement)value).Name); writer.WritePropertyName(PropName_NodeType); global::System.Text.Json.JsonSerializer.Serialize(writer, ((global::System.Xml.Linq.XElement)value).NodeType, XmlNodeType); writer.WriteString(PropName_Value, ((global::System.Xml.Linq.XElement)value).Value); writer.WritePropertyName(PropName_FirstNode); XNodeSerializeHandler(writer, ((global::System.Xml.Linq.XContainer)value).FirstNode); writer.WritePropertyName(PropName_LastNode); XNodeSerializeHandler(writer, ((global::System.Xml.Linq.XContainer)value).LastNode); writer.WritePropertyName(PropName_NextNode); XNodeSerializeHandler(writer, ((global::System.Xml.Linq.XNode)value).NextNode); writer.WritePropertyName(PropName_PreviousNode); XNodeSerializeHandler(writer, ((global::System.Xml.Linq.XNode)value).PreviousNode); writer.WriteString(PropName_BaseUri, ((global::System.Xml.Linq.XObject)value).BaseUri); writer.WritePropertyName(PropName_Document); XDocumentSerializeHandler(writer, ((global::System.Xml.Linq.XObject)value).Document); writer.WritePropertyName(PropName_Parent); XElementSerializeHandler(writer, ((global::System.Xml.Linq.XObject)value).Parent); writer.WriteEndObject(); } } } }