Guest User

Untitled

a guest
Jun 24th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.33 KB | None | 0 0
  1.   public static E LoadResource<E>(Uri path) where E: Resource
  2.         {
  3.             if(!factories.ContainsKey(typeof(E))) throw new ArgumentException("Cannot load type " + typeof(E).ToString() );
  4.             ResourceFactory<E> factory = (ResourceFactory<E>) factories[typeof(E)];
  5.             return factory.getResource(path);
  6.         }
Add Comment
Please, Sign In to add comment