52 num ^=
Mapping.Key.GetHashCode();
54 if (
Mapping.ElementName !=
null)
56 num ^=
Mapping.ElementName.GetHashCode();
60 num ^=
Mapping.Namespace.GetHashCode();
472 IgnoreWhitespace =
true
565 return mapping?.IsSoap ??
false;
633 for (
int j = 0;
j <
array.Length;
j++)
653 for (
int i = 0; i <
array.Length; i++)
658 array[i]._isReflectionBasedSerializer =
true;
664 [
UnconditionalSuppressMessage(
"SingleFile",
"IL3000: Avoid accessing Assembly file path when publishing as a single file", Justification =
"Code is used on diagnostics so we fallback to print assembly.FullName if assembly.Location is empty")]
723 for (
int i = 0; i <
mappings.Length; i++)
762 for (
int i = 0; i <
types.Length; i++)
813 if (ns !=
null && ns !=
string.
Empty)
static ? Delegate Remove(Delegate? source, Delegate? value)
static ? Delegate Combine(Delegate? a, Delegate? b)
static CultureInfo InvariantCulture
static bool IsDynamicCodeSupported
static string FailLoadAssemblyUnderPregenMode
static string XmlUnxpectedType
static string XmlMelformMapping
static string XmlSerializeError
static string XmlPregenTypeDynamic
static string Format(string resourceFormat, object p1)
static string XmlGenError
static string XmlSerializeErrorDetails
static string XmlPregenOrphanType
static string XmlInvalidEncodingNotEncoded1
static TypeCode GetTypeCode(Type? type)
static string GetTempAssemblyName(AssemblyName parent, string ns)
static bool IsTypeDynamic(Type type)
void InvokeWriter(XmlMapping mapping, XmlWriter xmlWriter, object o, XmlSerializerNamespaces namespaces, string encodingStyle, string id)
static Assembly LoadGeneratedAssembly(Type type, string defaultNamespace, out XmlSerializerImplementation contract)
bool CanRead(XmlMapping mapping, XmlReader xmlReader)
object InvokeReader(XmlMapping mapping, XmlReader xmlReader, XmlDeserializationEvents events, string encodingStyle)
static bool GenerateSerializerToStream(XmlMapping[] xmlMappings, Type[] types, string defaultNamespace, Assembly assembly, Hashtable assemblies, Stream stream)
static Hashtable PrimtiveTypes
static bool IsShallow(XmlMapping[] mappings)
static string GenerateKey(Type type, XmlRootAttribute root, string ns)
static XmlTypeMapping GetTopLevelMapping(Type type, string defaultNamespace)
XmlSerializerMappingKey(XmlMapping mapping)
override int GetHashCode()
override bool Equals([NotNullWhen(true)] object obj)
static XmlSerializer[] GetReflectionBasedSerializers(XmlMapping[] mappings, Type type)
static SerializationMode s_mode
void SerializeUsingReflection(XmlWriter xmlWriter, object o, XmlSerializerNamespaces namespaces, string encodingStyle, string id)
void SerializePrimitive(XmlWriter xmlWriter, object o, XmlSerializerNamespaces namespaces)
static bool ReflectionMethodEnabled
void Serialize(TextWriter textWriter, object? o, XmlSerializerNamespaces? namespaces)
TempAssembly _tempAssembly
static volatile XmlSerializerNamespaces s_defaultNamespaces
static string GetXmlSerializerAssemblyName(Type type, string? defaultNamespace)
void Serialize(XmlWriter xmlWriter, object? o, XmlSerializerNamespaces? namespaces)
UnreferencedObjectEventHandler UnreferencedObject
static XmlSerializer[] GetSerializersFromCache(XmlMapping[] mappings, Type type)
static XmlSerializerNamespaces DefaultNamespaces
static readonly Dictionary< Type, Dictionary< XmlSerializerMappingKey, XmlSerializer > > s_xmlSerializerTable
static XmlTypeMapping GetKnownMapping(Type type, string ns)
virtual bool CanDeserialize(XmlReader xmlReader)
bool _isReflectionBasedSerializer
XmlSerializer(Type type, Type[]? extraTypes)
virtual object Deserialize(XmlSerializationReader reader)
object DeserializePrimitive(XmlReader xmlReader, XmlDeserializationEvents events)
object? Deserialize(TextReader textReader)
void Serialize(XmlWriter xmlWriter, object? o)
XmlSerializer(Type type, XmlRootAttribute? root)
const string TrimSerializationWarning
void Serialize(TextWriter textWriter, object? o)
virtual XmlSerializationWriter CreateWriter()
static bool ShouldUseReflectionBasedSerialization(XmlMapping mapping)
static bool GenerateSerializer(Type[] types, XmlMapping[] mappings, Stream stream)
static TempAssembly GenerateTempAssembly(XmlMapping xmlMapping, Type type, string defaultNamespace)
object? Deserialize(XmlReader xmlReader)
virtual void Serialize(object? o, XmlSerializationWriter writer)
XmlSerializer(XmlTypeMapping xmlTypeMapping)
void SetTempAssembly(TempAssembly tempAssembly, XmlMapping mapping)
static readonly TempAssemblyCache s_cache
object? Deserialize(XmlReader xmlReader, string? encodingStyle)
XmlAttributeEventHandler UnknownAttribute
static XmlSerializer[] FromMappings(XmlMapping[]? mappings, Type? type)
XmlSerializer(Type type, string? defaultNamespace)
static XmlSerializer[] FromTypes(Type[]? types)
XmlSerializer(Type type, XmlAttributeOverrides? overrides, Type[]? extraTypes, XmlRootAttribute? root, string? defaultNamespace)
void Serialize(XmlWriter xmlWriter, object? o, XmlSerializerNamespaces? namespaces, string? encodingStyle, string? id)
static XmlSerializer[] FromMappings(XmlMapping[]? mappings)
static TempAssembly GenerateTempAssembly(XmlMapping xmlMapping, Type type, string defaultNamespace, string location)
XmlElementEventHandler UnknownElement
readonly Type _primitiveType
const string TrimDeserializationWarning
object? Deserialize(XmlReader xmlReader, XmlDeserializationEvents events)
void Serialize(XmlWriter xmlWriter, object? o, XmlSerializerNamespaces? namespaces, string? encodingStyle)
void Serialize(Stream stream, object? o)
object DeserializeUsingReflection(XmlReader xmlReader, string encodingStyle, XmlDeserializationEvents events)
static TempAssembly GenerateTempAssembly(XmlMapping xmlMapping)
XmlSerializer(Type type, XmlAttributeOverrides? overrides)
object? Deserialize(Stream stream)
XmlTypeMapping GenerateXmlTypeMapping(Type type, XmlAttributeOverrides overrides, Type[] extraTypes, XmlRootAttribute root, string defaultNamespace)
void Serialize(Stream stream, object? o, XmlSerializerNamespaces? namespaces)
XmlDeserializationEvents _events
virtual XmlSerializationReader CreateReader()
XmlNodeEventHandler UnknownNode
object? Deserialize(XmlReader xmlReader, string? encodingStyle, XmlDeserializationEvents events)
XmlSerializer(Type type, XmlAttributeOverrides? overrides, Type[]? extraTypes, XmlRootAttribute? root, string? defaultNamespace, string? location)
static string GetXmlSerializerAssemblyName(Type type)
static XmlReader Create(string inputUri)
static XmlWriter Create(string outputFileName)
delegate void XmlElementEventHandler(object? sender, XmlElementEventArgs e)
delegate void UnreferencedObjectEventHandler(object? sender, UnreferencedObjectEventArgs e)
delegate void XmlNodeEventHandler(object? sender, XmlNodeEventArgs e)
delegate void XmlAttributeEventHandler(object? sender, XmlAttributeEventArgs e)