public T Load <T>(string asset) where T : class { var path = Path.ChangeExtension(asset, ".dat"); if (!_resolver.Exist(path)) { throw new FileNotFoundException("The asset could not be found.", asset); } using (var stream = _resolver.GetStream(path)) { var context = new ContentReaderContext(stream, _device, this); return((T)_readers[typeof(T)].Read(context)); // lol } }
object IContentReader.Read(ContentReaderContext context) { return(Read(context)); }
public abstract T Read(ContentReaderContext context);