Advertisement
uurha

Untitled

Jul 31st, 2022 (edited)
1,351
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.29 KB | None | 0 0
  1. public class GameFactory : IFactory<IState>
  2. {
  3.     private readonly DiContainer _container;
  4.  
  5.     public GameFactory(DiContainer container)
  6.     {
  7.         _container= container;
  8.     }
  9.     public T Create<T>() where T : IState
  10.     {
  11.         return _container.Instantiate<T>();
  12.     }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement