C# Класс AGS.Types.SerializeUtils

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Описание методов

CompatStringToResolution() публичный статический метод

public static CompatStringToResolution ( String s ) : Size
s String
Результат System.Drawing.Size

DeserializeFromXML() публичный статический метод

public static DeserializeFromXML ( object obj, XmlNode node ) : void
obj object
node System.Xml.XmlNode
Результат void

GetAttributeInt() публичный статический метод

public static GetAttributeInt ( XmlNode node, string attrName ) : int
node System.Xml.XmlNode
attrName string
Результат int

GetAttributeString() публичный статический метод

public static GetAttributeString ( XmlNode node, string attrName ) : string
node System.Xml.XmlNode
attrName string
Результат string

GetChildNodes() публичный статический метод

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
Результат System.Xml.XmlNodeList

GetElementString() публичный статический метод

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
Результат string

GetElementStringOrDefault() публичный статический метод

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
Результат string

ResolutionToCompatString() публичный статический метод

public static ResolutionToCompatString ( Size size ) : String
size System.Drawing.Size
Результат String

SerializeToXML() публичный статический метод

public static SerializeToXML ( object obj, XmlTextWriter writer ) : void
obj object
writer System.Xml.XmlTextWriter
Результат void

SerializeToXML() публичный статический метод

public static SerializeToXML ( object obj, XmlTextWriter writer, bool writeEndElement ) : void
obj object
writer System.Xml.XmlTextWriter
writeEndElement bool
Результат void