Esempio n. 1
0
        /// <summary>
        /// Creates new instance from WindowsAzureOffer
        /// </summary>
        /// <param name="offer">The offer details</param>
        /// <param name="plans">The offer plans</param>
        public WindowsAzureOffer(Offer offer, IEnumerable<Plan> plans, IEnumerable<string> locations)
        {
            Id = offer.Id;

            Name = offer.Name;

            ShortDescription = offer.ShortDescription;

            Description = offer.Description;

            PublishDate = offer.PublishDate;

            IconUrl = offer.IconUrl;

            MarketplaceDetailUrl = offer.MarketplaceDetailUrl;

            OfferType = offer.OfferType;

            ProviderName = offer.ProviderName;

            ProviderId = offer.ProviderId;

            WebsiteUrl = offer.WebsiteUrl;

            Country = offer.Country;

            EulaUrl = offer.EulaUrl;

            PrivacyPolicyUrl = offer.PrivacyPolicyUrl;

            Provider = offer.ProviderIdentifier;

            AddOn = offer.OfferIdentifier;

            IsAvailableInAzureStores = offer.IsAvailableInAzureStores;

            Plans = new List<Plan>(plans);

            Locations = new List<string>(locations);
        }
Esempio n. 2
0
 /// <summary>
 /// Detects if the given offer is Microsoft offer or not.
 /// </summary>
 /// <param name="offer">The offer instance</param>
 /// <returns>True if Microsoft offer, false otherwise</returns>
 public virtual bool IsMicrosoftOffer(Offer offer)
 {
     return StoreConstants.MicrosoftProviderIds.Contains(offer.ProviderId);
 }