Exemple #1
0
 public AdCuePoint(JToken node) : base(node)
 {
     if (node["protocolType"] != null)
     {
         this._ProtocolType = (AdProtocolType)StringEnum.Parse(typeof(AdProtocolType), node["protocolType"].Value <string>());
     }
     if (node["sourceUrl"] != null)
     {
         this._SourceUrl = node["sourceUrl"].Value <string>();
     }
     if (node["adType"] != null)
     {
         this._AdType = (AdType)StringEnum.Parse(typeof(AdType), node["adType"].Value <string>());
     }
     if (node["title"] != null)
     {
         this._Title = node["title"].Value <string>();
     }
     if (node["endTime"] != null)
     {
         this._EndTime = ParseInt(node["endTime"].Value <string>());
     }
     if (node["duration"] != null)
     {
         this._Duration = ParseInt(node["duration"].Value <string>());
     }
 }
        public AdCuePoint(XmlElement node) : base(node)
        {
            foreach (XmlElement propertyNode in node.ChildNodes)
            {
                switch (propertyNode.Name)
                {
                case "protocolType":
                    this._ProtocolType = (AdProtocolType)StringEnum.Parse(typeof(AdProtocolType), propertyNode.InnerText);
                    continue;

                case "sourceUrl":
                    this._SourceUrl = propertyNode.InnerText;
                    continue;

                case "adType":
                    this._AdType = (AdType)StringEnum.Parse(typeof(AdType), propertyNode.InnerText);
                    continue;

                case "title":
                    this._Title = propertyNode.InnerText;
                    continue;

                case "endTime":
                    this._EndTime = ParseInt(propertyNode.InnerText);
                    continue;

                case "duration":
                    this._Duration = ParseInt(propertyNode.InnerText);
                    continue;
                }
            }
        }
Exemple #3
0
        public AdCuePointBaseFilter(XmlElement node) : base(node)
        {
            foreach (XmlElement propertyNode in node.ChildNodes)
            {
                switch (propertyNode.Name)
                {
                case "protocolTypeEqual":
                    this._ProtocolTypeEqual = (AdProtocolType)StringEnum.Parse(typeof(AdProtocolType), propertyNode.InnerText);
                    continue;

                case "protocolTypeIn":
                    this._ProtocolTypeIn = propertyNode.InnerText;
                    continue;

                case "titleLike":
                    this._TitleLike = propertyNode.InnerText;
                    continue;

                case "titleMultiLikeOr":
                    this._TitleMultiLikeOr = propertyNode.InnerText;
                    continue;

                case "titleMultiLikeAnd":
                    this._TitleMultiLikeAnd = propertyNode.InnerText;
                    continue;

                case "endTimeGreaterThanOrEqual":
                    this._EndTimeGreaterThanOrEqual = ParseInt(propertyNode.InnerText);
                    continue;

                case "endTimeLessThanOrEqual":
                    this._EndTimeLessThanOrEqual = ParseInt(propertyNode.InnerText);
                    continue;

                case "durationGreaterThanOrEqual":
                    this._DurationGreaterThanOrEqual = ParseInt(propertyNode.InnerText);
                    continue;

                case "durationLessThanOrEqual":
                    this._DurationLessThanOrEqual = ParseInt(propertyNode.InnerText);
                    continue;
                }
            }
        }
Exemple #4
0
 public AdCuePointBaseFilter(JToken node) : base(node)
 {
     if (node["protocolTypeEqual"] != null)
     {
         this._ProtocolTypeEqual = (AdProtocolType)StringEnum.Parse(typeof(AdProtocolType), node["protocolTypeEqual"].Value <string>());
     }
     if (node["protocolTypeIn"] != null)
     {
         this._ProtocolTypeIn = node["protocolTypeIn"].Value <string>();
     }
     if (node["titleLike"] != null)
     {
         this._TitleLike = node["titleLike"].Value <string>();
     }
     if (node["titleMultiLikeOr"] != null)
     {
         this._TitleMultiLikeOr = node["titleMultiLikeOr"].Value <string>();
     }
     if (node["titleMultiLikeAnd"] != null)
     {
         this._TitleMultiLikeAnd = node["titleMultiLikeAnd"].Value <string>();
     }
     if (node["endTimeGreaterThanOrEqual"] != null)
     {
         this._EndTimeGreaterThanOrEqual = ParseInt(node["endTimeGreaterThanOrEqual"].Value <string>());
     }
     if (node["endTimeLessThanOrEqual"] != null)
     {
         this._EndTimeLessThanOrEqual = ParseInt(node["endTimeLessThanOrEqual"].Value <string>());
     }
     if (node["durationGreaterThanOrEqual"] != null)
     {
         this._DurationGreaterThanOrEqual = ParseInt(node["durationGreaterThanOrEqual"].Value <string>());
     }
     if (node["durationLessThanOrEqual"] != null)
     {
         this._DurationLessThanOrEqual = ParseInt(node["durationLessThanOrEqual"].Value <string>());
     }
 }