Ejemplo n.º 1
0
        public static BitPoker.Repository.IPlayerRepository GetPlayerRepository()
        {
            String repoName = System.Configuration.ConfigurationManager.AppSettings["PlayerRepository"];

            if (!String.IsNullOrEmpty(repoName))
            {
                BitPoker.Repository.IPlayerRepository repo = (BitPoker.Repository.IPlayerRepository)Activator.CreateInstance(Type.GetType(repoName));

                if (repo != null)
                {
                    return(repo);
                }
                else
                {
                    return(new InMemoryPlayerRepo());
                }
            }
            else
            {
                return(new InMemoryPlayerRepo());
            }
        }
Ejemplo n.º 2
0
 public MessageController()
 {
     this.playerRepo = new Repository.InMemoryPlayerRepo();
     this.handRepo   = new Repository.InMemoryHandRepo();
     this.tableRepo  = new Repository.InMemoryTableRepo();
 }
Ejemplo n.º 3
0
 public PlayersController(BitPoker.Repository.IPlayerRepository repo)
 {
     PlayerRepo = repo;
 }
Ejemplo n.º 4
0
 public PlayersController()
 {
     PlayerRepo = new BitPoker.Repository.Mocks.PlayerRepository(@"E:\Repos\bitpoker\BitPoker.Repository\mockplayers.json");
 }
Ejemplo n.º 5
0
 public PlayersController()
 {
     _repo = Repository.Factory.GetPlayerRepository();
 }