public static PublishedScreenshot CreatePublishedScreenshot(int ID) { PublishedScreenshot publishedScreenshot = new PublishedScreenshot(); publishedScreenshot.Id = ID; return(publishedScreenshot); }
private static PackagingEntry CreatePackageEntry(PublishedPackage package, PackagingSource source, Uri downloadUri) { var baseUri = new Uri(string.Format("{0}://{1}:{2}/", downloadUri.Scheme, downloadUri.Host, downloadUri.Port)); PublishedScreenshot screenshot = package.Screenshots != null?package.Screenshots.FirstOrDefault() : null; string iconUrl = GetAbsoluteUri(package.IconUrl, baseUri); string firstScreenshot = screenshot != null?GetAbsoluteUri(screenshot.ScreenshotUri, baseUri) : string.Empty; return(new PackagingEntry { Title = string.IsNullOrWhiteSpace(package.Title) ? package.Id : package.Title, PackageId = package.Id, PackageStreamUri = downloadUri.ToString(), ProjectUrl = package.ProjectUrl, GalleryDetailsUrl = package.GalleryDetailsUrl, Source = source, Version = package.Version ?? string.Empty, Description = package.Description, Authors = package.Authors, LastUpdated = package.LastUpdated, IconUrl = iconUrl, FirstScreenshot = firstScreenshot, Rating = package.Rating, RatingsCount = package.RatingsCount, DownloadCount = package.DownloadCount }); }
public static PublishedScreenshot CreatePublishedScreenshot(int ID) { PublishedScreenshot publishedScreenshot = new PublishedScreenshot(); publishedScreenshot.Id = ID; return publishedScreenshot; }
public void AddToScreenshots(PublishedScreenshot publishedScreenshot) { base.AddObject("Screenshots", publishedScreenshot); }
public void AddToScreenshots(PublishedScreenshot publishedScreenshot) { base.AddObject("Screenshots", publishedScreenshot); }