<PackageReference Include="System.Private.DataContractSerialization" Version="4.0.1" />

System.Runtime.Serialization.DataContractSerializer

public bool IgnoreExtensionDataObject { get; }

public int MaxItemsInObjectGraph { get; }

public bool PreserveObjectReferences { get; }

public bool SerializeReadOnlyTypes { get; }

public DataContractSerializer(Type type, IEnumerable<Type> knownTypes)

public DataContractSerializer(Type type, string rootName, string rootNamespace)

public DataContractSerializer(Type type, string rootName, string rootNamespace, IEnumerable<Type> knownTypes)

public DataContractSerializer(Type type, XmlDictionaryString rootName, XmlDictionaryString rootNamespace, IEnumerable<Type> knownTypes)

public DataContractSerializer(Type type, XmlDictionaryString rootName, XmlDictionaryString rootNamespace, IEnumerable<Type> knownTypes, int maxItemsInObjectGraph, bool ignoreExtensionDataObject, bool preserveObjectReferences, DataContractResolver dataContractResolver)