C# Class SPM2.Framework.Xml.Serializer

ファイルを表示 Open project: keutmann/SPM

Public Methods

Method Description
BinaryToObject ( Array data, Type objType ) : object
Clone ( instance ) : T
CollectionToXml ( XmlWriter outputStream, ICollection list ) : void

Serializes list

DeserializeFromElement ( XmlElement element, Type objectType ) : object
FormatXml ( string xml ) : string
GetSerializer ( Type type, XmlAttributeOverrides overrides ) : XmlSerializer
LoadAttributes ( object obj, XmlTextReader xtr ) : void
ObjectToBinary ( object input, Type objType ) : byte[]
ObjectToXML ( object input ) : string
ObjectToXML ( object input, XmlAttributeOverrides xmlOverrides, XmlSerializerNamespaces ns ) : string
ObjectToXML ( object input, XmlSerializerNamespaces ns ) : string
ObjectToXML ( object input, XmlWriter writer, XmlAttributeOverrides xmlOverrides, XmlSerializerNamespaces ns ) : void
XmlToCollection ( XmlReader inputStream, ICollection interfaceList ) : void

Deserializes list

XmlToObject ( string xml ) : T

Private Methods

Method Description
StringToUTF8ByteArray ( String pXmlString ) : Byte[]
UTF8ByteArrayToString ( Array characters ) : String
Utf8ToUnicode ( string utf8 ) : string

Method Details

BinaryToObject() public static method

public static BinaryToObject ( Array data, Type objType ) : object
data Array
objType Type
return object

Clone() public static method

public static Clone ( instance ) : T
return T

CollectionToXml() public static method

Serializes list
public static CollectionToXml ( XmlWriter outputStream, ICollection list ) : void
outputStream System.Xml.XmlWriter Ouput stream to write the serialized data
list ICollection
return void

DeserializeFromElement() public static method

public static DeserializeFromElement ( XmlElement element, Type objectType ) : object
element XmlElement
objectType Type
return object

FormatXml() public static method

public static FormatXml ( string xml ) : string
xml string
return string

GetSerializer() public static method

public static GetSerializer ( Type type, XmlAttributeOverrides overrides ) : XmlSerializer
type Type
overrides XmlAttributeOverrides
return XmlSerializer

LoadAttributes() public static method

public static LoadAttributes ( object obj, XmlTextReader xtr ) : void
obj object
xtr XmlTextReader
return void

ObjectToBinary() public static method

public static ObjectToBinary ( object input, Type objType ) : byte[]
input object
objType Type
return byte[]

ObjectToXML() public static method

public static ObjectToXML ( object input ) : string
input object
return string

ObjectToXML() public static method

public static ObjectToXML ( object input, XmlAttributeOverrides xmlOverrides, XmlSerializerNamespaces ns ) : string
input object
xmlOverrides XmlAttributeOverrides
ns XmlSerializerNamespaces
return string

ObjectToXML() public static method

public static ObjectToXML ( object input, XmlSerializerNamespaces ns ) : string
input object
ns XmlSerializerNamespaces
return string

ObjectToXML() public static method

public static ObjectToXML ( object input, XmlWriter writer, XmlAttributeOverrides xmlOverrides, XmlSerializerNamespaces ns ) : void
input object
writer XmlWriter
xmlOverrides XmlAttributeOverrides
ns XmlSerializerNamespaces
return void

XmlToCollection() public static method

Deserializes list
public static XmlToCollection ( XmlReader inputStream, ICollection interfaceList ) : void
inputStream System.Xml.XmlReader
interfaceList ICollection
return void

XmlToObject() public static method

public static XmlToObject ( string xml ) : T
xml string
return T