<PackageReference Include="System.Xml.ReaderWriter" Version="4.0.11-beta-23409" />

XmlSchemaProviderAttribute

public sealed class XmlSchemaProviderAttribute : Attribute
When applied to a type, stores the name of a static method of the type that returns an XML schema and a XmlQualifiedName (or XmlSchemaType for anonymous types) that controls the serialization of the type.
public bool IsAny { get; set; }

Gets or sets a value that determines whether the target class is a wildcard, or that the schema for the class has contains only an xs:any element.

public string MethodName { get; }

Gets the name of the static method that supplies the type's XML schema and the name of its XML Schema data type.

public XmlSchemaProviderAttribute(string methodName)

Initializes a new instance of the XmlSchemaProviderAttribute class, taking the name of the static method that supplies the type's XML schema.