SHARE
TWEET

Untitled

a guest Oct 19th, 2011 121 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     public static class GameServices
  2.     {
  3.         private static GameServiceContainer container = new GameServiceContainer();
  4.  
  5.         public static T Get<T>()
  6.         {
  7.             return (T)container.GetService(typeof(T));
  8.         }
  9.  
  10.         public static void Add<T>(T service)
  11.         {
  12.             container.AddService(typeof(T), service);
  13.         }
  14.  
  15.         public static void Remove<T>()
  16.         {
  17.             container.RemoveService(typeof(T));
  18.         }
  19.     }
  20.  
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top