C# Class AGS.Types.SerializeUtils

Afficher le fichier Open project: adventuregamestudio/ags Class Usage Examples

Méthodes publiques

Méthode Description
CompatStringToResolution ( String s ) : Size
DeserializeFromXML ( object obj, XmlNode node ) : void
GetAttributeInt ( XmlNode node, string attrName ) : int
GetAttributeString ( XmlNode node, string attrName ) : string
GetChildNodes ( XmlNode parent, string elementName ) : XmlNodeList

Wrapper function for SelectSingleNode that throws an exception mentioning the node name if it is not found. Returns the node's children if successful.

GetElementString ( XmlNode node, string elementName ) : string

Wrapper function for SelectSingleNode that throws an exception mentioning the node name if it is not found. Returns the node text if successful.

GetElementStringOrDefault ( XmlNode node, string elementName, string defaultValue ) : string

Wrapper function for SelectSingleNode that returns the node text or some default text if it does not exist.

ResolutionToCompatString ( Size size ) : String
SerializeToXML ( object obj, XmlTextWriter writer ) : void
SerializeToXML ( object obj, XmlTextWriter writer, bool writeEndElement ) : void

Method Details

CompatStringToResolution() public static méthode

public static CompatStringToResolution ( String s ) : Size
s String
Résultat System.Drawing.Size

DeserializeFromXML() public static méthode

public static DeserializeFromXML ( object obj, XmlNode node ) : void
obj object
node System.Xml.XmlNode
Résultat void

GetAttributeInt() public static méthode

public static GetAttributeInt ( XmlNode node, string attrName ) : int
node System.Xml.XmlNode
attrName string
Résultat int

GetAttributeString() public static méthode

public static GetAttributeString ( XmlNode node, string attrName ) : string
node System.Xml.XmlNode
attrName string
Résultat string

GetChildNodes() public static méthode

Wrapper function for SelectSingleNode that throws an exception mentioning the node name if it is not found. Returns the node's children if successful.
public static GetChildNodes ( XmlNode parent, string elementName ) : XmlNodeList
parent System.Xml.XmlNode
elementName string
Résultat System.Xml.XmlNodeList

GetElementString() public static méthode

Wrapper function for SelectSingleNode that throws an exception mentioning the node name if it is not found. Returns the node text if successful.
public static GetElementString ( XmlNode node, string elementName ) : string
node System.Xml.XmlNode
elementName string
Résultat string

GetElementStringOrDefault() public static méthode

Wrapper function for SelectSingleNode that returns the node text or some default text if it does not exist.
public static GetElementStringOrDefault ( XmlNode node, string elementName, string defaultValue ) : string
node System.Xml.XmlNode
elementName string
defaultValue string
Résultat string

ResolutionToCompatString() public static méthode

public static ResolutionToCompatString ( Size size ) : String
size System.Drawing.Size
Résultat String

SerializeToXML() public static méthode

public static SerializeToXML ( object obj, XmlTextWriter writer ) : void
obj object
writer System.Xml.XmlTextWriter
Résultat void

SerializeToXML() public static méthode

public static SerializeToXML ( object obj, XmlTextWriter writer, bool writeEndElement ) : void
obj object
writer System.Xml.XmlTextWriter
writeEndElement bool
Résultat void