ResourceManager.cs 807 B

12345678910111213141516171819202122232425262728
  1. // $Id$
  2. using System.IO;
  3. namespace Resources
  4. {
  5. /// <summary>
  6. /// The ResourceManager is responsible for querying and loading of
  7. /// application resources
  8. /// </summary>
  9. /// <remarks>
  10. /// Resources can be plain files on disk, but could
  11. /// also be stored in compressed archives or dynamically loaded from the net,
  12. /// that's why we use a ResourceManager here.
  13. /// </remarks>
  14. public abstract class ResourceManager
  15. {
  16. public static ResourceManager Instance = new DefaultResourceManager("data");
  17. // Try to avoid this function
  18. [System.Obsolete("Do not use GetFileName: resource could be inside an archive file")]
  19. public abstract string GetFileName(string ResourcePath);
  20. public abstract Stream Get(string ResourcePath);
  21. public abstract string GetDirectoryName(string ResourcePath);
  22. }
  23. }