예제 #1
0
 protected override void BeforeGetUser(string user_id)
 {
     if (!this.storeProvider.Exists(user_id))
     {
         PersistentUser user = new PersistentUser(new User());
         this.storeProvider.Store(user_id, user);
         this.storeProvider.Persist();
     }
 }
예제 #2
0
        protected override IUser GetUser(string user_id)
        {
            PersistentUser user = this.storeProvider.Get <PersistentUser>(user_id);

            return(new User(user));
        }
예제 #3
0
        public User(PersistentUser persistentUser)
        {
            var history_list = persistentUser.HistoryEntries.ToDictionary(x => x.Id, x => x);

            this.history = new ConcurrentDictionary <string, UserHistoryEntry>(history_list);
        }