Ejemplo n.º 1
0
        public static RatingSource FromRequest(ActivityRequest source)
        {
            RatingSource cause = new RatingSource("Request");

            cause.Converted = source;
            return(cause);
        }
Ejemplo n.º 2
0
        public static RatingSource DirectRating(AbsoluteRating source)
        {
            RatingSource cause = new RatingSource("Direct");

            cause.Converted = source;
            return(cause);
        }
Ejemplo n.º 3
0
        public static RatingSource FromSkip(ActivitySkip source)
        {
            RatingSource cause = new RatingSource("Skip");

            cause.Converted = source;
            return(cause);
        }
Ejemplo n.º 4
0
        public static RatingSource FromParticipation(Participation source)
        {
            RatingSource cause = new RatingSource("Participation");

            cause.Converted = source;
            return(cause);
        }
Ejemplo n.º 5
0
 public AbsoluteRating(double score, DateTime date, ActivityDescriptor activityDescriptor, RatingSource source)
 {
     this.Score = score;
     this.Date  = date;
     this.ActivityDescriptor = activityDescriptor;
     this.Source             = source;
     this.Initialize();
 }
Ejemplo n.º 6
0
 // checks whether it's possible that this rating was generated by this participation, and if so, fills in some data for it
 public virtual void AttemptToMatch(Participation participation)
 {
     this.Source = RatingSource.FromParticipation(participation);
 }
Ejemplo n.º 7
0
 // adds any additional data based on the fact that this rating was generated by the given ActivityRequest
 public virtual void FillInFromRequest(ActivityRequest request)
 {
     this.Source = RatingSource.FromRequest(request);
 }