BoardGameGeekApiClient.Helpers.BoardGameGeekApiClientHelper.GetIntResultScore C# (CSharp) Method

GetIntResultScore() private static method

private static GetIntResultScore ( this results, string selector ) : int
results this
selector string
return int
        private static int GetIntResultScore(this XElement results, string selector)
        {
            int res = 0;
            try
            {
                string value = (from p in results.Elements("result") where p.Attribute("value").Value == selector select p.Attribute("numvotes").Value).FirstOrDefault();

                if (value != null)
                    int.TryParse(value, out res);
            }
            catch (Exception)
            {
                return 0;
            }

            return res;
        }
        public static int GetRanking(this XElement rankingElement)