public static bool HasElement(this XElement xElement, XName name, out XElement element) { element = xElement.Element(name); var hasElement = XElementHelper.WasFound(element); return(hasElement); }
public static bool HasChildFirstOrDefault(this XElement xElement, string childName, out XElement child) { child = xElement.GetChildren(childName) .FirstOrDefault(); var hasChild = XElementHelper.WasFound(child); return(hasChild); }
public static bool ValueAsBoolean(this XElement xElement) { var valueAsBoolean = XElementHelper.ValueAsBoolean(xElement.Value); return(valueAsBoolean); }