public TReturn Recurrence(ERecurFromType recurFromType, Func <DateProjectionCreateHelper, IDateProjection> dateProjectionFactory) { IDateProjection dateProjection = dateProjectionFactory(new DateProjectionCreateHelper()); this.Activity.Recurrence = new DateRecurrence(dateProjection, recurFromType); return((TReturn)this); }
public DateRecurrence(IDateProjection recurObj, ERecurFromType recurFrom, int maxRecurrenceCount) : base(recurObj) { this.MaxRecurrenceCount = maxRecurrenceCount; this.StartDate = DateTime.MinValue; this.EndDate = DateTime.MaxValue; this.RecurFromType = recurFrom; }
public DateRecurrence(EDateProjectionType recurType, ERecurFromType recurFrom) : base(recurType) { this.MaxRecurrenceCount = 0; this.StartDate = DateTime.MinValue; this.EndDate = DateTime.MaxValue; this.RecurFromType = recurFrom; }
public DateRecurrence(IDateProjection recurObj, ERecurFromType recurFrom, DateTime startDate, DateTime endDate) : base(recurObj) { this.MaxRecurrenceCount = 0; this.StartDate = startDate; this.EndDate = endDate; if (this.StartDate > this.EndDate) { throw new ArgumentException($"Start date ({startDate}) is after the end date ({endDate})."); } this.RecurFromType = recurFrom; }