C# Class StaticAnalysis.XmlExtensions

Datei anzeigen Open project: Azure/azure-powershell

Public Methods

Method Description
ContainsChildElement ( this element, IEnumerable names ) : bool

Determines if the given element contains a child element with any of the provided names

ContainsChildElement ( this element, IEnumerable names, bool>.Func predicate ) : bool

Determines if the given element contains a child element with any of the provided names that satisfies the given predicate

ContainsChildElement ( this element, string name ) : bool

Determines if the given element contains a child element of the given name

ContainsChildElement ( this element, string name, bool>.Func predicate ) : bool

Determines if the given element contains a child element of the given name that satisfies the specified predicate

GetChildElement ( this parent, string name ) : System.Xml.Linq.XElement

Get the first child element with the given name

GetChildElement ( this parent, string name, bool>.Func predicate ) : System.Xml.Linq.XElement

Get the first child element with the given name that satisfies the given predicate

GetChildElements ( this parent, string name ) : IEnumerable

Get all child elements with the given name

GetChildElements ( this parent, string name, bool>.Func predicate ) : IEnumerable

Get all child elements with the given name that satisfy the given predicate

Method Details

ContainsChildElement() public static method

Determines if the given element contains a child element with any of the provided names
public static ContainsChildElement ( this element, IEnumerable names ) : bool
element this The element to search
names IEnumerable The child element names to search for
return bool

ContainsChildElement() public static method

Determines if the given element contains a child element with any of the provided names that satisfies the given predicate
public static ContainsChildElement ( this element, IEnumerable names, bool>.Func predicate ) : bool
element this The element to search
names IEnumerable The child element names to search for
predicate bool>.Func An additional condition to check on descendant elements
return bool

ContainsChildElement() public static method

Determines if the given element contains a child element of the given name
public static ContainsChildElement ( this element, string name ) : bool
element this The element to search
name string The child element name to search for
return bool

ContainsChildElement() public static method

Determines if the given element contains a child element of the given name that satisfies the specified predicate
public static ContainsChildElement ( this element, string name, bool>.Func predicate ) : bool
element this The element to search
name string The child element name to search for
predicate bool>.Func An additional condition on descendant elements
return bool

GetChildElement() public static method

Get the first child element with the given name
public static GetChildElement ( this parent, string name ) : System.Xml.Linq.XElement
parent this The element to search
name string The child element name to search for
return System.Xml.Linq.XElement

GetChildElement() public static method

Get the first child element with the given name that satisfies the given predicate
public static GetChildElement ( this parent, string name, bool>.Func predicate ) : System.Xml.Linq.XElement
parent this The element to search
name string The child element name to search for
predicate bool>.Func Additional conditions over the desired child element
return System.Xml.Linq.XElement

GetChildElements() public static method

Get all child elements with the given name
public static GetChildElements ( this parent, string name ) : IEnumerable
parent this The element to search
name string The child element name to search for
return IEnumerable

GetChildElements() public static method

Get all child elements with the given name that satisfy the given predicate
public static GetChildElements ( this parent, string name, bool>.Func predicate ) : IEnumerable
parent this The element to search
name string The child element name to search for
predicate bool>.Func The additional condition to satisfy
return IEnumerable