Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
System.Xml.Serialization.XmlSerializer Class Reference

Classes

class  XmlSerializerMappingKey
 

Public Member Functions

 XmlSerializer (Type type, XmlAttributeOverrides? overrides, Type[]? extraTypes, XmlRootAttribute? root, string? defaultNamespace)
 
 XmlSerializer (Type type, XmlRootAttribute? root)
 
 XmlSerializer (Type type, Type[]? extraTypes)
 
 XmlSerializer (Type type, XmlAttributeOverrides? overrides)
 
 XmlSerializer (XmlTypeMapping xmlTypeMapping)
 
 XmlSerializer (Type type)
 
 XmlSerializer (Type type, string? defaultNamespace)
 
 XmlSerializer (Type type, XmlAttributeOverrides? overrides, Type[]? extraTypes, XmlRootAttribute? root, string? defaultNamespace, string? location)
 
void Serialize (TextWriter textWriter, object? o)
 
void Serialize (TextWriter textWriter, object? o, XmlSerializerNamespaces? namespaces)
 
void Serialize (Stream stream, object? o)
 
void Serialize (Stream stream, object? o, XmlSerializerNamespaces? namespaces)
 
void Serialize (XmlWriter xmlWriter, object? o)
 
void Serialize (XmlWriter xmlWriter, object? o, XmlSerializerNamespaces? namespaces)
 
void Serialize (XmlWriter xmlWriter, object? o, XmlSerializerNamespaces? namespaces, string? encodingStyle)
 
void Serialize (XmlWriter xmlWriter, object? o, XmlSerializerNamespaces? namespaces, string? encodingStyle, string? id)
 
object? Deserialize (Stream stream)
 
object? Deserialize (TextReader textReader)
 
object? Deserialize (XmlReader xmlReader)
 
object? Deserialize (XmlReader xmlReader, XmlDeserializationEvents events)
 
object? Deserialize (XmlReader xmlReader, string? encodingStyle)
 
object? Deserialize (XmlReader xmlReader, string? encodingStyle, XmlDeserializationEvents events)
 
virtual bool CanDeserialize (XmlReader xmlReader)
 

Static Public Member Functions

static XmlSerializer[] FromMappings (XmlMapping[]? mappings)
 
static XmlSerializer[] FromMappings (XmlMapping[]? mappings, Type? type)
 
static XmlSerializer[] FromTypes (Type[]? types)
 
static string GetXmlSerializerAssemblyName (Type type)
 
static string GetXmlSerializerAssemblyName (Type type, string? defaultNamespace)
 

Protected Member Functions

 XmlSerializer ()
 
virtual XmlSerializationReader CreateReader ()
 
virtual object Deserialize (XmlSerializationReader reader)
 
virtual XmlSerializationWriter CreateWriter ()
 
virtual void Serialize (object? o, XmlSerializationWriter writer)
 

Package Functions

void SetTempAssembly (TempAssembly tempAssembly, XmlMapping mapping)
 

Static Package Functions

static TempAssembly GenerateTempAssembly (XmlMapping xmlMapping)
 
static TempAssembly GenerateTempAssembly (XmlMapping xmlMapping, Type type, string defaultNamespace)
 
static TempAssembly GenerateTempAssembly (XmlMapping xmlMapping, Type type, string defaultNamespace, string location)
 
static bool GenerateSerializer (Type[] types, XmlMapping[] mappings, Stream stream)
 

Package Attributes

string DefaultNamespace
 

Static Package Attributes

const string TrimSerializationWarning = "Members from serialized types may be trimmed if not referenced directly"
 

Properties

static SerializationMode Mode [get, set]
 
static bool ReflectionMethodEnabled [get]
 
static XmlSerializerNamespaces DefaultNamespaces [get]
 
XmlNodeEventHandler UnknownNode
 
XmlAttributeEventHandler UnknownAttribute
 
XmlElementEventHandler UnknownElement
 
UnreferencedObjectEventHandler UnreferencedObject
 

Private Member Functions

XmlTypeMapping GenerateXmlTypeMapping (Type type, XmlAttributeOverrides overrides, Type[] extraTypes, XmlRootAttribute root, string defaultNamespace)
 
void SerializeUsingReflection (XmlWriter xmlWriter, object o, XmlSerializerNamespaces namespaces, string encodingStyle, string id)
 
XmlMapping GetMapping ()
 
object DeserializeUsingReflection (XmlReader xmlReader, string encodingStyle, XmlDeserializationEvents events)
 
void SerializePrimitive (XmlWriter xmlWriter, object o, XmlSerializerNamespaces namespaces)
 
object DeserializePrimitive (XmlReader xmlReader, XmlDeserializationEvents events)
 

Static Private Member Functions

static bool ShouldUseReflectionBasedSerialization (XmlMapping mapping)
 
static XmlSerializer[] GetReflectionBasedSerializers (XmlMapping[] mappings, Type type)
 
static XmlSerializer[] GetSerializersFromCache (XmlMapping[] mappings, Type type)
 
static XmlTypeMapping GetKnownMapping (Type type, string ns)
 

Private Attributes

TempAssembly _tempAssembly
 
bool _typedSerializer
 
readonly Type _primitiveType
 
XmlMapping _mapping
 
XmlDeserializationEvents _events
 
Type _rootType
 
bool _isReflectionBasedSerializer
 

Static Private Attributes

static SerializationMode s_mode = SerializationMode.ReflectionAsBackup
 
static readonly TempAssemblyCache s_cache = new TempAssemblyCache()
 
static volatile XmlSerializerNamespaces s_defaultNamespaces
 
const string TrimDeserializationWarning = "Members from deserialized types may be trimmed if not referenced directly"
 
static readonly Dictionary< Type, Dictionary< XmlSerializerMappingKey, XmlSerializer > > s_xmlSerializerTable = new Dictionary<Type, Dictionary<XmlSerializerMappingKey, XmlSerializer>>()
 

Detailed Description

Definition at line 11 of file XmlSerializer.cs.


The documentation for this class was generated from the following file: