Example #1
0
        private string GetDetail(ReviewDetailType detailType)
        {
            string retString = null;

            if (detailType == ReviewDetailType.Summary)
            {
                retString = Model.Summary;
            }
            else if (detailType == ReviewDetailType.MediaTitle)
            {
                retString = Model.Media?.Title?.UserPreferred;
            }
            else if (detailType == ReviewDetailType.Rating)
            {
                retString = $"Rating:  {Model.Rating} / {Model.RatingAmount}";
            }

            return(retString);
        }
Example #2
0
 public ReviewViewModel(Review model, ReviewDetailType primaryReviewDetailType, ReviewDetailType secondaryReviewDetailType) : base(model)
 {
     TitleText         = GetDetail(primaryReviewDetailType);
     DetailPrimaryText = GetDetail(secondaryReviewDetailType);
 }