C# 클래스 TVSorter.Storage.XElementExtensions

Provides extensions methods for the XElement class.
파일 보기 프로젝트 열기: a-jackson/tvsorter

공개 메소드들

메소드 설명
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.

메소드 상세

GetAttribute() 공개 정적인 메소드

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. ///
리턴 string

GetElementText() 공개 정적인 메소드

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. ///
리턴 string

GetElementsText() 공개 정적인 메소드

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. ///
리턴 IEnumerable