ALMRestClient.ALMClient.FindTotal C# (CSharp) Method

FindTotal() private static method

Find the total count
private static FindTotal ( System.Xml.Linq.XDocument doc ) : int
doc System.Xml.Linq.XDocument The xml document from HP ALM containing the elements
return int
        private static int FindTotal(XDocument doc)
        {
            var attribute = doc.Root.Attribute("TotalResults");
            if (attribute != null)
            {
                try
                {
                    return int.Parse(attribute.Value);
                }
                catch (Exception e)
                {
                    // swallow the exception - not much can be done
                }
            }
            return 0;
        }