コード例 #1
0
 public void Handle(TableCreated e)
 {
     _tables.Save(new TableView()
     {
         Id         = e.Id,
         Name       = e.Name,
         BuyIn      = e.BuyIn,
         SmallBlind = e.SmallBlind,
         MaxPlayers = e.MaxPlayers
     });
 }
コード例 #2
0
        private void CreateUser(UserCreated e)
        {
            var user = new UserView
            {
                Id           = e.Id,
                UserName     = e.UserName,
                FacebookId   = e.FacebookId,
                Email        = e.Email.ToLowerInvariant(),
                PasswordHash = e.PasswordHash,
                PasswordSalt = e.PasswordSalt,
                CreationDate = e.CreationDate,
                Cash         = e.Cash
            };

            _users.Save(user);
        }
コード例 #3
0
 public void Handle(SiteCreated e)
 {
     _sites.Save(e.Id, site => { });
 }
コード例 #4
0
 public bool Save(string key, object obj)
 {
     return(_collection.Save(key, obj));
 }