public PlayerWebDataGather(string root, IPlayerGather pg, IProgress <int> prog, CancellationToken ct) { // Root is the Desktop\PGA Stats directory which holds Players.xml and the statCat.json file root_di = new DirectoryInfo(root); wc = new WebClient(); _pg = pg; _progress = prog; _ct = ct; _error_names = new List <string>(); }
static async Task MainAsync(string DataDir, IPlayerGather pg) { var web_gather = new PlayerWebDataGather(DataDir, pg); web_gather.DownloadingPlayer += DownloadPlayerNotice; web_gather.DownloadPlayerError += WritePlayerError; web_gather.WritingPlayer += WritePlayerNotice; await web_gather.GatherAndWriteAllPlayerStats(); }
public StatPopulator(string w, IJSONSerializer s, IPlayerGather pg) { _working_directory = w; _serializer = s; _pg = pg; }