C# Class DevMentor.Context.XmlHelper

Afficher le fichier Open project: pmizel/DevMentor.Context.FileContext

Méthodes publiques

Méthode Description
DeserializeObject ( String pXmlizedString, Type objectType ) : Object

Method to reconstruct an Object from XML string

SerializeObject ( Object pObject, Type objectType ) : String

Method to convert a custom Object to XML string

Private Methods

Méthode Description
StringToUTF8ByteArray ( String pXmlString ) : Byte[]

Converts the String to UTF8 Byte array and is used in De serialization

UTF8ByteArrayToString ( Byte characters ) : String

To convert a Byte Array of Unicode values (UTF-8 encoded) to a complete String.

Method Details

DeserializeObject() public static méthode

Method to reconstruct an Object from XML string
public static DeserializeObject ( String pXmlizedString, Type objectType ) : Object
pXmlizedString String
objectType System.Type
Résultat Object

SerializeObject() public static méthode

Method to convert a custom Object to XML string
public static SerializeObject ( Object pObject, Type objectType ) : String
pObject Object Object that is to be serialized to XML
objectType System.Type
Résultat String