public ScheduleEventRecurrence(XmlElement node) : base(node)
        {
            foreach (XmlElement propertyNode in node.ChildNodes)
            {
                switch (propertyNode.Name)
                {
                case "name":
                    this._Name = propertyNode.InnerText;
                    continue;

                case "frequency":
                    this._Frequency = (ScheduleEventRecurrenceFrequency)StringEnum.Parse(typeof(ScheduleEventRecurrenceFrequency), propertyNode.InnerText);
                    continue;

                case "until":
                    this._Until = ParseInt(propertyNode.InnerText);
                    continue;

                case "timeZone":
                    this._TimeZone = propertyNode.InnerText;
                    continue;

                case "count":
                    this._Count = ParseInt(propertyNode.InnerText);
                    continue;

                case "interval":
                    this._Interval = ParseInt(propertyNode.InnerText);
                    continue;

                case "bySecond":
                    this._BySecond = propertyNode.InnerText;
                    continue;

                case "byMinute":
                    this._ByMinute = propertyNode.InnerText;
                    continue;

                case "byHour":
                    this._ByHour = propertyNode.InnerText;
                    continue;

                case "byDay":
                    this._ByDay = propertyNode.InnerText;
                    continue;

                case "byMonthDay":
                    this._ByMonthDay = propertyNode.InnerText;
                    continue;

                case "byYearDay":
                    this._ByYearDay = propertyNode.InnerText;
                    continue;

                case "byWeekNumber":
                    this._ByWeekNumber = propertyNode.InnerText;
                    continue;

                case "byMonth":
                    this._ByMonth = propertyNode.InnerText;
                    continue;

                case "byOffset":
                    this._ByOffset = propertyNode.InnerText;
                    continue;

                case "weekStartDay":
                    this._WeekStartDay = (ScheduleEventRecurrenceDay)StringEnum.Parse(typeof(ScheduleEventRecurrenceDay), propertyNode.InnerText);
                    continue;
                }
            }
        }
コード例 #2
0
 public ScheduleEventRecurrence(JToken node) : base(node)
 {
     if (node["name"] != null)
     {
         this._Name = node["name"].Value <string>();
     }
     if (node["frequency"] != null)
     {
         this._Frequency = (ScheduleEventRecurrenceFrequency)StringEnum.Parse(typeof(ScheduleEventRecurrenceFrequency), node["frequency"].Value <string>());
     }
     if (node["until"] != null)
     {
         this._Until = ParseInt(node["until"].Value <string>());
     }
     if (node["timeZone"] != null)
     {
         this._TimeZone = node["timeZone"].Value <string>();
     }
     if (node["count"] != null)
     {
         this._Count = ParseInt(node["count"].Value <string>());
     }
     if (node["interval"] != null)
     {
         this._Interval = ParseInt(node["interval"].Value <string>());
     }
     if (node["bySecond"] != null)
     {
         this._BySecond = node["bySecond"].Value <string>();
     }
     if (node["byMinute"] != null)
     {
         this._ByMinute = node["byMinute"].Value <string>();
     }
     if (node["byHour"] != null)
     {
         this._ByHour = node["byHour"].Value <string>();
     }
     if (node["byDay"] != null)
     {
         this._ByDay = node["byDay"].Value <string>();
     }
     if (node["byMonthDay"] != null)
     {
         this._ByMonthDay = node["byMonthDay"].Value <string>();
     }
     if (node["byYearDay"] != null)
     {
         this._ByYearDay = node["byYearDay"].Value <string>();
     }
     if (node["byWeekNumber"] != null)
     {
         this._ByWeekNumber = node["byWeekNumber"].Value <string>();
     }
     if (node["byMonth"] != null)
     {
         this._ByMonth = node["byMonth"].Value <string>();
     }
     if (node["byOffset"] != null)
     {
         this._ByOffset = node["byOffset"].Value <string>();
     }
     if (node["weekStartDay"] != null)
     {
         this._WeekStartDay = (ScheduleEventRecurrenceDay)StringEnum.Parse(typeof(ScheduleEventRecurrenceDay), node["weekStartDay"].Value <string>());
     }
 }