C# Класс SharpNeat.Domains.XmlUtils

Static helper methods for reading value from XML configuration data in DOM form.
Показать файл Открыть проект

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

Метод Описание
GetValueAsBool ( XmlElement xmlParent, string elemName ) : bool

Parse the inner text of element with the given name as a boolean. If element is missing or parsing fails then throws an ArgumentException.

GetValueAsDouble ( XmlElement xmlParent, string elemName ) : double

Parse the inner text of element with the given name as a double. If element is missing or parsing fails then throws an ArgumentException.

GetValueAsInt ( XmlElement xmlParent, string elemName ) : int

Parse the inner text of element with the given name as an integer. If element is missing or parsing fails then throws an ArgumentException.

GetValueAsString ( XmlElement xmlParent, string elemName ) : string

Read the inner text of element with the given name. If element is missing then throws an ArgumentException.

TryGetValueAsBool ( XmlElement xmlParent, string elemName ) : bool?

Parse the inner text of element with the given name as a boolean. If element is missing or parsing fails then returns null.

TryGetValueAsDouble ( XmlElement xmlParent, string elemName ) : double?

Parse the inner text of element with the given name as a double. If element is missing or parsing fails then returns null.

TryGetValueAsInt ( XmlElement xmlParent, string elemName ) : int?

Parse the inner text of element with the given name as an integer. If element is missing or parsing fails then returns null.

TryGetValueAsString ( XmlElement xmlParent, string elemName ) : string

Read the inner text of element with the given name. If element is missing then returns null.

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

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

Parse the inner text of element with the given name as a boolean. If element is missing or parsing fails then throws an ArgumentException.
public static GetValueAsBool ( XmlElement xmlParent, string elemName ) : bool
xmlParent System.Xml.XmlElement
elemName string
Результат bool

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

Parse the inner text of element with the given name as a double. If element is missing or parsing fails then throws an ArgumentException.
public static GetValueAsDouble ( XmlElement xmlParent, string elemName ) : double
xmlParent System.Xml.XmlElement
elemName string
Результат double

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

Parse the inner text of element with the given name as an integer. If element is missing or parsing fails then throws an ArgumentException.
public static GetValueAsInt ( XmlElement xmlParent, string elemName ) : int
xmlParent System.Xml.XmlElement
elemName string
Результат int

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

Read the inner text of element with the given name. If element is missing then throws an ArgumentException.
public static GetValueAsString ( XmlElement xmlParent, string elemName ) : string
xmlParent System.Xml.XmlElement
elemName string
Результат string

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

Parse the inner text of element with the given name as a boolean. If element is missing or parsing fails then returns null.
public static TryGetValueAsBool ( XmlElement xmlParent, string elemName ) : bool?
xmlParent System.Xml.XmlElement
elemName string
Результат bool?

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

Parse the inner text of element with the given name as a double. If element is missing or parsing fails then returns null.
public static TryGetValueAsDouble ( XmlElement xmlParent, string elemName ) : double?
xmlParent System.Xml.XmlElement
elemName string
Результат double?

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

Parse the inner text of element with the given name as an integer. If element is missing or parsing fails then returns null.
public static TryGetValueAsInt ( XmlElement xmlParent, string elemName ) : int?
xmlParent System.Xml.XmlElement
elemName string
Результат int?

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

Read the inner text of element with the given name. If element is missing then returns null.
public static TryGetValueAsString ( XmlElement xmlParent, string elemName ) : string
xmlParent System.Xml.XmlElement
elemName string
Результат string