internal StoreApp(ZuneApp.feed item) : this() { var purchaseItem = item.offers.offer.First(x => x.licenseRight == "Purchase"); var trialItem = item.offers.offer.FirstOrDefault(x => x.licenseRight == "Trial"); BackgroundImageId = string.IsNullOrEmpty(item.backgroundImage.id) ? string.Empty : item.backgroundImage.id.Replace("urn:uuid:", ""); Capabilities = ParseCapabilities(item.entry.deviceCapabilities); Category = new Category(item.categories.category); foreach (var client in item.entry.clientTypes) { ClientTypes.Add((ClientType)Enum.Parse(typeof(ClientType), client, true)); } Content = item.content.Value; Currency = purchaseItem.priceCurrencyCode; //HasLiveTile = ??? HasTrial = trialItem != default(ZuneAppSearch.offersOffer); Id = item.id.Replace("urn:uuid:", ""); ImageId = item.image.id.Replace("urn:uuid:", ""); InstallSize = item.entry.installSize; IsAvailableInCountry = item.entry.isAvailableInCountry; IsAvailableInStore = item.entry.isAvailableInStore; IsBlacklisted = item.entry.isBlacklisted; Name = item.title.Value; PackageSize = item.entry.packageSize; Price = purchaseItem.displayPrice; PublisherName = item.publisher; ReleaseDate = item.releaseDate; ScreenshotIds = item.screenshots.ToList().Select(x => x.id).ToList(); SortName = item.sortTitle; SupportedLanguages = item.entry.supportedLanguages != null ? new List<string>(item.entry.supportedLanguages) : new List<string>(); Tags = item.tags.tag; Url = item.entry.url; UserRating = item.averageUserRating; UserRatingCount = item.userRatingCount; Version = item.entry.version; }
internal Capability(ZuneApp.capabilitiesHwCapability capabilities) { CapabilityType = CapabilityType.Hardware; Id = capabilities.id; Name = capabilities.@string; }