Ejemplo n.º 1
0
        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
            }
        }
Ejemplo n.º 2
0
 object IContentReader.Read(ContentReaderContext context)
 {
     return(Read(context));
 }
Ejemplo n.º 3
0
 public abstract T Read(ContentReaderContext context);