public async Task <ReplayHeader> ReadLPR(string filePath) { var lprParser = new LprParser(); using (FileStream fileStream = new FileStream(filePath, FileMode.Open)) { return(await lprParser.ReadReplayAsync(fileStream)); } }
private IReplayParser SelectParser(ReplayFile file) { IReplayParser parser = null; switch (file.Type) { case REPLAYTYPES.ROFL: parser = new RoflParser(); break; case REPLAYTYPES.LRF: parser = new LrfParser(); break; case REPLAYTYPES.LPR: parser = new LprParser(); break; default: throw new Exception($"{exceptionOriginName} - Unknown replay file type"); } return(parser); }