public PlayReadyLicenseDetails(JToken node) : base(node)
 {
     if (node["policy"] != null)
     {
         this._Policy = ObjectFactory.Create <PlayReadyPolicy>(node["policy"]);
     }
     if (node["beginDate"] != null)
     {
         this._BeginDate = ParseInt(node["beginDate"].Value <string>());
     }
     if (node["expirationDate"] != null)
     {
         this._ExpirationDate = ParseInt(node["expirationDate"].Value <string>());
     }
     if (node["removalDate"] != null)
     {
         this._RemovalDate = ParseInt(node["removalDate"].Value <string>());
     }
 }
Пример #2
0
        public PlayReadyLicenseDetails(XmlElement node) : base(node)
        {
            foreach (XmlElement propertyNode in node.ChildNodes)
            {
                switch (propertyNode.Name)
                {
                case "policy":
                    this._Policy = ObjectFactory.Create <PlayReadyPolicy>(propertyNode);
                    continue;

                case "beginDate":
                    this._BeginDate = ParseInt(propertyNode.InnerText);
                    continue;

                case "expirationDate":
                    this._ExpirationDate = ParseInt(propertyNode.InnerText);
                    continue;

                case "removalDate":
                    this._RemovalDate = ParseInt(propertyNode.InnerText);
                    continue;
                }
            }
        }