C# Class TVSorter.Storage.XElementExtensions

Provides extensions methods for the XElement class.
Afficher le fichier Open project: a-jackson/tvsorter

Méthodes publiques

Méthode Description
GetAttribute ( this element, string name, string defaultValue = null ) : string

Gets the value of the specified attribute from the specified element.

GetElementText ( this element, System.Xml.Linq.XName name, string defaultValue = null ) : string

Gets the text from child element of the specified element. Returns defaultValue if it doesn't exist.

GetElementsText ( this element, System.Xml.Linq.XName name ) : IEnumerable

Gets the text from child element of the specified element. Returns defaultValue if it doesn't exist.

Method Details

GetAttribute() public static méthode

Gets the value of the specified attribute from the specified element.
public static GetAttribute ( this element, string name, string defaultValue = null ) : string
element this /// The element to read the attribute from. ///
name string /// The name of the attribute. ///
defaultValue string /// The value to return if the attribute doesn't exist. ///
Résultat string

GetElementText() public static méthode

Gets the text from child element of the specified element. Returns defaultValue if it doesn't exist.
public static GetElementText ( this element, System.Xml.Linq.XName name, string defaultValue = null ) : string
element this /// The element to read. ///
name System.Xml.Linq.XName /// The name of the child element. ///
defaultValue string /// The default value to return if it doesn't exist. ///
Résultat string

GetElementsText() public static méthode

Gets the text from child element of the specified element. Returns defaultValue if it doesn't exist.
public static GetElementsText ( this element, System.Xml.Linq.XName name ) : IEnumerable
element this /// The element to read. ///
name System.Xml.Linq.XName /// The name of the child element. ///
Résultat IEnumerable