예제 #1
0
 public Ekreta.Mobile.Core.Models.Rating IncreaseAttempts(Profile profile)
 {
     Ekreta.Mobile.Core.Models.Rating rating = this.GetRatingByProfile(profile) ?? new Ekreta.Mobile.Core.Models.Rating();
     rating.LastSeenDate = DateTime.Now;
     ++rating.SeenCount;
     this.AddOrUpdate(profile, rating);
     return(rating);
 }
예제 #2
0
 public Ekreta.Mobile.Core.Models.Rating Init(Profile profile, bool firebaseConfigChanged)
 {
     Ekreta.Mobile.Core.Models.Rating rating = this.GetRatingByProfile(profile);
     if (rating == null)
     {
         rating = new Ekreta.Mobile.Core.Models.Rating()
         {
             LastSeenDate = DateTime.Now.AddDays((double)-this.CancelIdleDays)
         };
         this.AddOrUpdate(profile, rating);
     }
     else if (firebaseConfigChanged)
     {
         rating.LastSeenDate = DateTime.Now.AddDays((double)-this.CancelIdleDays);
         this.AddOrUpdate(profile, rating);
     }
     return(rating);
 }
예제 #3
0
 public void AddOrUpdate(Profile profile, Ekreta.Mobile.Core.Models.Rating rating)
 {
     rating.ProfileId = profile.RolelessId;
     this._ratingRepository.AddOrUpdate(rating);
 }