Exemplo n.º 1
0
        public static bool HasElement(this XElement xElement, XName name, out XElement element)
        {
            element = xElement.Element(name);

            var hasElement = XElementHelper.WasFound(element);

            return(hasElement);
        }
Exemplo n.º 2
0
        public static bool HasChildFirstOrDefault(this XElement xElement, string childName, out XElement child)
        {
            child = xElement.GetChildren(childName)
                    .FirstOrDefault();

            var hasChild = XElementHelper.WasFound(child);

            return(hasChild);
        }