Ejemplo n.º 1
0
        /// <summary>
        /// Copies from.
        /// </summary>
        /// <param name="other">The other.</param>
        public void CopyFrom(RecurrenceRule other)
        {
            if (this.GetType().FullName != other.GetType().FullName)
            {
                throw new ArgumentException("Invalid type");
            }

            this.Pattern = other.Pattern.Copy();
            this.exceptions.Clear();
            foreach (ExceptionOccurrence exception in other.exceptions)
            {
                this.exceptions.Add(exception.Copy());
            }

            this.OnStateChanged(EventArgs.Empty);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Copies from.
        /// </summary>
        /// <param name="other">The other.</param>
        /// <exception cref="ArgumentException">Invalid type</exception>
        public void CopyFrom(RecurrencePattern other)
        {
            if (this.GetType().FullName != other.GetType().FullName)
            {
                throw new ArgumentException("Invalid type");
            }

            this.Frequency      = other.Frequency;
            this.Interval       = other.Interval;
            this.DayOrdinal     = other.DayOrdinal;
            this.DayOfMonth     = other.DayOfMonth;
            this.DaysOfWeekMask = other.DaysOfWeekMask;
            this.MonthOfYear    = other.MonthOfYear;

            this.RecursUntil    = other.RecursUntil;
            this.MaxOccurrences = other.MaxOccurrences;
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RecurrenceRule"/> class.
 /// </summary>
 /// <param name="pattern">The pattern.</param>
 public RecurrenceRule(RecurrencePattern pattern)
 {
     this.pattern = pattern;
     this.pattern.PropertyChanged += this.PatternPropertyChanged;
 }