public Ppv(XmlElement node) : base(node) { foreach (XmlElement propertyNode in node.ChildNodes) { switch (propertyNode.Name) { case "id": this._Id = propertyNode.InnerText; continue; case "name": this._Name = propertyNode.InnerText; continue; case "price": this._Price = ObjectFactory.Create <PriceDetails>(propertyNode); continue; case "fileTypes": this._FileTypes = new List <IntegerValue>(); foreach (XmlElement arrayNode in propertyNode.ChildNodes) { this._FileTypes.Add(ObjectFactory.Create <IntegerValue>(arrayNode)); } continue; case "discountModules": this._DiscountModules = ObjectFactory.Create <DiscountModule>(propertyNode); continue; case "couponsGroup": this._CouponsGroup = ObjectFactory.Create <CouponsGroup>(propertyNode); continue; case "descriptions": this._Descriptions = new List <TranslationToken>(); foreach (XmlElement arrayNode in propertyNode.ChildNodes) { this._Descriptions.Add(ObjectFactory.Create <TranslationToken>(arrayNode)); } continue; case "productCode": this._ProductCode = propertyNode.InnerText; continue; case "isSubscriptionOnly": this._IsSubscriptionOnly = ParseBool(propertyNode.InnerText); continue; case "firstDeviceLimitation": this._FirstDeviceLimitation = ParseBool(propertyNode.InnerText); continue; case "usageModule": this._UsageModule = ObjectFactory.Create <UsageModule>(propertyNode); continue; } } }
public Subscription(XmlElement node) : base(node) { foreach (XmlElement propertyNode in node.ChildNodes) { switch (propertyNode.Name) { case "id": this._Id = propertyNode.InnerText; continue; case "channels": this._Channels = new List <BaseChannel>(); foreach (XmlElement arrayNode in propertyNode.ChildNodes) { this._Channels.Add(ObjectFactory.Create <BaseChannel>(arrayNode)); } continue; case "startDate": this._StartDate = ParseLong(propertyNode.InnerText); continue; case "endDate": this._EndDate = ParseLong(propertyNode.InnerText); continue; case "fileTypes": this._FileTypes = new List <IntegerValue>(); foreach (XmlElement arrayNode in propertyNode.ChildNodes) { this._FileTypes.Add(ObjectFactory.Create <IntegerValue>(arrayNode)); } continue; case "isRenewable": this._IsRenewable = ParseBool(propertyNode.InnerText); continue; case "renewalsNumber": this._RenewalsNumber = ParseInt(propertyNode.InnerText); continue; case "isInfiniteRenewal": this._IsInfiniteRenewal = ParseBool(propertyNode.InnerText); continue; case "price": this._Price = ObjectFactory.Create <PriceDetails>(propertyNode); continue; case "discountModule": this._DiscountModule = ObjectFactory.Create <DiscountModule>(propertyNode); continue; case "couponsGroup": this._CouponsGroup = ObjectFactory.Create <CouponsGroup>(propertyNode); continue; case "names": this._Names = new List <TranslationToken>(); foreach (XmlElement arrayNode in propertyNode.ChildNodes) { this._Names.Add(ObjectFactory.Create <TranslationToken>(arrayNode)); } continue; case "descriptions": this._Descriptions = new List <TranslationToken>(); foreach (XmlElement arrayNode in propertyNode.ChildNodes) { this._Descriptions.Add(ObjectFactory.Create <TranslationToken>(arrayNode)); } continue; case "mediaId": this._MediaId = ParseInt(propertyNode.InnerText); continue; case "prorityInOrder": this._ProrityInOrder = ParseLong(propertyNode.InnerText); continue; case "productCode": this._ProductCode = propertyNode.InnerText; continue; case "pricePlans": this._PricePlans = new List <PricePlan>(); foreach (XmlElement arrayNode in propertyNode.ChildNodes) { this._PricePlans.Add(ObjectFactory.Create <PricePlan>(arrayNode)); } continue; case "previewModule": this._PreviewModule = ObjectFactory.Create <PreviewModule>(propertyNode); continue; case "householdLimitationsId": this._HouseholdLimitationsId = ParseInt(propertyNode.InnerText); continue; case "gracePeriodMinutes": this._GracePeriodMinutes = ParseInt(propertyNode.InnerText); continue; case "premiumServices": this._PremiumServices = new List <PremiumService>(); foreach (XmlElement arrayNode in propertyNode.ChildNodes) { this._PremiumServices.Add(ObjectFactory.Create <PremiumService>(arrayNode)); } continue; case "maxViewsNumber": this._MaxViewsNumber = ParseInt(propertyNode.InnerText); continue; case "viewLifeCycle": this._ViewLifeCycle = ParseInt(propertyNode.InnerText); continue; case "waiverPeriod": this._WaiverPeriod = ParseInt(propertyNode.InnerText); continue; case "isWaiverEnabled": this._IsWaiverEnabled = ParseBool(propertyNode.InnerText); continue; case "userTypes": this._UserTypes = new List <OTTUserType>(); foreach (XmlElement arrayNode in propertyNode.ChildNodes) { this._UserTypes.Add(ObjectFactory.Create <OTTUserType>(arrayNode)); } continue; } } }