public IReaderProvider Load(string filepath) { var ext = Path.GetExtension(filepath); if (!Loaders.ContainsKey(ext)) { throw new ArgumentException("The game file is not of a supported type."); } var loader = Loaders[ext]; loader.Init(filepath); var readerProvider = new ReaderProvider(loader); return(readerProvider); }