Advertisement
cheprogrammer

ResourceManager Prototype Full

Feb 25th, 2016
318
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.85 KB | None | 0 0
  1. public static class ResourceManager<T> where T : UniqueEntity
  2. {
  3.     public static string ResoucePath = "data";
  4.  
  5.     public static bool IsLoaded { get; private set; }
  6.  
  7.     public static string ResourceFilename { get; }
  8.  
  9.     private static List<T> Resources { get; set; }
  10.  
  11.     private static IResourceManagerFactory<T> _resourceManagerFactory = null;
  12.  
  13.     private static FormatterType _formatterType;
  14.  
  15.     private static UInt16 _currentIdentifireID = 1;
  16.  
  17.    
  18.     static ResourceManager();
  19.  
  20.     public static void RegisterFactory(IResourceManagerFactory<T> factory);
  21.  
  22.     public static T GetResource(int id);
  23.  
  24.     public static void AddResource(T item);
  25.  
  26.     public static IEnumerable<T> GetResources();
  27.  
  28.     public static void SetFormatterType(FormatterType type);
  29.  
  30.     public static void Load();
  31.  
  32.     public static void Load(FormatterType formatter);
  33.  
  34.     public static void Save();
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement