Пример #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
            }
        }
Пример #2
0
 object IContentReader.Read(ContentReaderContext context)
 {
     return(Read(context));
 }
Пример #3
0
 public abstract T Read(ContentReaderContext context);