private Parser(PlayerType playerType) { // Create the html file if it doesn't exist var fetcher = Retriever.GetInstance(); fetcher.CreateFile(playerType); // Read in the html file. _document.Load(fetcher.FileName); // Get the table that our statistics are under. _stats = _document.DocumentNode.SelectNodes("//table[@id='maincontent_gvGridViewPlayers_gvPlayers']/thead/tr"); _names = _document.DocumentNode.SelectNodes("//table[@id='maincontent_gvGridViewPlayers_gvPlayers']/tbody/tr"); }
/// <summary> /// Returns a singleton instance of data retriever /// </summary> /// <returns></returns> public static Retriever GetInstance() { return(_dataRetriever ?? (_dataRetriever = new Retriever())); }