/// <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); }
/// <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; }
/// <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; }