// <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.XDocument>? _XDocument; /// <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.XDocument> XDocument #nullable enable annotations { get => _XDocument ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Xml.Linq.XDocument>)Options.GetTypeInfo(typeof(global::System.Xml.Linq.XDocument)); } private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Xml.Linq.XDocument> Create_XDocument(global::System.Text.Json.JsonSerializerOptions options) { if (!TryGetTypeInfoForRuntimeCustomConverter<global::System.Xml.Linq.XDocument>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Xml.Linq.XDocument> jsonTypeInfo)) { var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::System.Xml.Linq.XDocument> { ObjectCreator = () => new global::System.Xml.Linq.XDocument(), ObjectWithParameterizedConstructorCreator = null, PropertyMetadataInitializer = _ => XDocumentPropInit(options), ConstructorParameterMetadataInitializer = null, ConstructorAttributeProviderFactory = static () => typeof(global::System.Xml.Linq.XDocument).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null), SerializeHandler = XDocumentSerializeHandler, }; jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::System.Xml.Linq.XDocument>(options, objectInfo); jsonTypeInfo.NumberHandling = null; } jsonTypeInfo.OriginatingResolver = this; return jsonTypeInfo; } private static global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[] XDocumentPropInit(global::System.Text.Json.JsonSerializerOptions options) { var properties = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfo[12]; var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Xml.Linq.XDeclaration> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::System.Xml.Linq.XDocument), Converter = null, Getter = static obj => ((global::System.Xml.Linq.XDocument)obj).Declaration, Setter = static (obj, value) => ((global::System.Xml.Linq.XDocument)obj).Declaration = value!, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "Declaration", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::System.Xml.Linq.XDocument).GetProperty("Declaration", InstanceMemberBindingFlags, null, typeof(global::System.Xml.Linq.XDeclaration), global::System.Array.Empty<global::System.Type>(), null), }; properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Xml.Linq.XDeclaration>(options, info0); var info1 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Xml.Linq.XDocumentType> { IsProperty = true, IsPublic = true, IsVirtual = false, DeclaringType = typeof(global::System.Xml.Linq.XDocument), Converter = null, Getter = static obj => ((global::System.Xml.Linq.XDocument)obj).DocumentType, Setter = null, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "DocumentType", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::System.Xml.Linq.XDocument).GetProperty("DocumentType", InstanceMemberBindingFlags, null, typeof(global::System.Xml.Linq.XDocumentType), global::System.Array.Empty<global::System.Type>(), null), }; properties[1] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Xml.Linq.XDocumentType>(options, info1); var info2 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Xml.XmlNodeType> { IsProperty = true, IsPublic = true, IsVirtual = true, DeclaringType = typeof(global::System.Xml.Linq.XDocument), Converter = null, Getter = static obj => ((global::System.Xml.Linq.XDocument)obj).NodeType, Setter = null, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "NodeType", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::System.Xml.Linq.XDocument).GetProperty("NodeType", InstanceMemberBindingFlags, null, typeof(global::System.Xml.XmlNodeType), global::System.Array.Empty<global::System.Type>(), null), }; properties[2] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Xml.XmlNodeType>(options, info2); var info3 = 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.XDocument), Converter = null, Getter = static obj => ((global::System.Xml.Linq.XDocument)obj).Root, Setter = null, IgnoreCondition = null, HasJsonInclude = false, IsExtensionData = false, NumberHandling = null, PropertyName = "Root", JsonPropertyName = null, AttributeProviderFactory = static () => typeof(global::System.Xml.Linq.XDocument).GetProperty("Root", InstanceMemberBindingFlags, null, typeof(global::System.Xml.Linq.XElement), global::System.Array.Empty<global::System.Type>(), null), }; properties[3] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Xml.Linq.XElement>(options, info3); var info4 = 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[4] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Xml.Linq.XNode>(options, info4); var info5 = 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[5] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Xml.Linq.XNode>(options, info5); var info6 = 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[6] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Xml.Linq.XNode>(options, info6); var info7 = 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[7] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Xml.Linq.XNode>(options, info7); var info8 = 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[8] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<string>(options, info8); var info9 = 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[9] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Xml.Linq.XDocument>(options, info9); var info10 = 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[10] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Xml.XmlNodeType>(options, info10); var info11 = 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[11] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Xml.Linq.XElement>(options, info11); 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 XDocumentSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::System.Xml.Linq.XDocument? value) { if (value is null) { writer.WriteNullValue(); return; } writer.WriteStartObject(); writer.WritePropertyName(PropName_Declaration); XDeclarationSerializeHandler(writer, ((global::System.Xml.Linq.XDocument)value).Declaration); writer.WritePropertyName(PropName_DocumentType); XDocumentTypeSerializeHandler(writer, ((global::System.Xml.Linq.XDocument)value).DocumentType); writer.WritePropertyName(PropName_NodeType); global::System.Text.Json.JsonSerializer.Serialize(writer, ((global::System.Xml.Linq.XDocument)value).NodeType, XmlNodeType); writer.WritePropertyName(PropName_Root); XElementSerializeHandler(writer, ((global::System.Xml.Linq.XDocument)value).Root); 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(); } } } }