Example #1
0
        public static BitPoker.Repository.IHandRepository GetHandRepository()
        {
            String repoName = System.Configuration.ConfigurationManager.AppSettings["HandRepository"];

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

                if (repo != null)
                {
                    return(repo);
                }
                else
                {
                    return(new InMemoryHandRepo());
                }
            }
            else
            {
                return(new InMemoryHandRepo());
            }
        }
Example #2
0
 public HandController(BitPoker.Repository.IHandRepository repo)
 {
     _repo = repo;
 }
Example #3
0
 public HandController()
 {
     _repo = Repository.Factory.GetHandRepository();
 }
Example #4
0
 public MessageController()
 {
     this.playerRepo = new Repository.InMemoryPlayerRepo();
     this.handRepo   = new Repository.InMemoryHandRepo();
     this.tableRepo  = new Repository.InMemoryTableRepo();
 }
Example #5
0
 public DeckController()
 {
     repo = new BitPoker.Repository.Mocks.HandRepository();
 }
Example #6
0
 public DealController(BitPoker.Repository.ITableRepository tableRepo, BitPoker.Repository.IHandRepository handRepo)
 {
     this.tableRepo = tableRepo;
     this.handRepo  = handRepo;
 }
Example #7
0
 public DealController()
 {
     this.tableRepo = new Repository.InMemoryTableRepo();
     this.handRepo  = new Repository.InMemoryHandRepo();
 }