public ExtensionViewModel(Extension e, string projectDescription, double averageRating, string baseUrl)
 {
     Extension          = e;
     ProjectDescription = projectDescription;
     StarRating         = new StarRating(e.Release.Id, averageRating);
     DownloadUrl        = e.DownloadUrl(baseUrl);
 }
Ejemplo n.º 2
0
 public ReleaseViewModel(Release e)
 {
     AverageRating = e.GetAverageRating();
     Icon          = e.Extension.Icon;
     NrDownloads   = e.DownloadCount;
     Title         = e.Extension.Name;
     Description   = e.Extension.Description;
     Author        = e.Extension.Author;
     ModifiedDate  = e.Project.ModifiedDate;
     VsixId        = e.Extension.VsixId;
     StarRating    = new StarRating(e.Id, AverageRating);
     NrRatings     = e.Ratings.Count();
 }