C# Class DevMentor.Context.XmlHelper

Exibir arquivo Open project: pmizel/DevMentor.Context.FileContext

Public Methods

Method 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

Method 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 method

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

SerializeObject() public static method

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
return String