Ejemplo n.º 1
0
        //Alle dependecies injecteren via deze constructor.

        public UserContainer(IUserContainerDAL dAL, IUserDAL userdal, IBetDAL betDAL)
        {
            this._containerDAL = dAL;
            this._userdal      = userdal;
            this._betDAL       = betDAL;
            Users = this.GetAllUsers();
        }
Ejemplo n.º 2
0
 public User(string name, IUserDAL userdal, IBetDAL betdal)
 {
     this.Name        = name;
     this._userDAL    = userdal;
     this._betDal     = betdal;
     this.UserRole    = 2;
     this.Permissions = new List <string>();
     this.CurrentBet  = MakeBetObject(betdal.GetCurrentBet(this.Id));
 }
Ejemplo n.º 3
0
        public void GetInfo_ShouldReturnPropNameAndValue()
        {
            // Arrange
            IBetDTO bet = new ColorBet(PocketColor.Black, null)
            {
                ID    = 2,
                Stake = 20
            };


            // Act
            IBetDAL dal = Factory.CreateBetDAL();
            bool    x   = dal.Save(bet);
        }
Ejemplo n.º 4
0
        public RoomContainer(
            IRoomContainerDAL containerdAL,
            IRoomDAL roomDAL,
            IRoundDAL roundDAL,
            IUserDAL userDAL,
            IBetDAL betDAL,
            IWheel wheel)
        {
            this._containerDAL = containerdAL;
            this._roomDAL      = roomDAL;
            this._roundDAL     = roundDAL;
            this._userDAL      = userDAL;
            this._betDAL       = betDAL;
            this._wheel        = wheel;

            this.Rooms = this.GetAllRooms();
        }
Ejemplo n.º 5
0
        public Room(int id,
                    IRoomDAL roomDAL,
                    IRoundDAL roundDAL,
                    IUserDAL userDAL,
                    IBetDAL _betDAL,
                    IWheel wheel)
        {
            this.Id = id;

            this._roomDAL  = roomDAL;
            this._roundDAL = roundDAL;
            this._betDAL   = _betDAL;
            this._userDAL  = userDAL;
            this._wheel    = wheel;

            this.Rounds  = this.GetAllRounds();
            this.Players = this.GetAllUsers();
        }
Ejemplo n.º 6
0
 public ColorBet(PocketColor color, IBetDAL dAL)
 {
     Color    = color;
     betDAL   = dAL;
     this.Odd = 2;
 }