public TReturn Recurrence(ERecurFromType recurFromType, Func <DateProjectionCreateHelper, IDateProjection> dateProjectionFactory)
        {
            IDateProjection dateProjection = dateProjectionFactory(new DateProjectionCreateHelper());

            this.Activity.Recurrence = new DateRecurrence(dateProjection, recurFromType);
            return((TReturn)this);
        }
示例#2
0
 public DateRecurrence(IDateProjection recurObj, ERecurFromType recurFrom, int maxRecurrenceCount)
     : base(recurObj)
 {
     this.MaxRecurrenceCount = maxRecurrenceCount;
     this.StartDate          = DateTime.MinValue;
     this.EndDate            = DateTime.MaxValue;
     this.RecurFromType      = recurFrom;
 }
示例#3
0
 public DateRecurrence(EDateProjectionType recurType, ERecurFromType recurFrom)
     : base(recurType)
 {
     this.MaxRecurrenceCount = 0;
     this.StartDate          = DateTime.MinValue;
     this.EndDate            = DateTime.MaxValue;
     this.RecurFromType      = recurFrom;
 }
示例#4
0
        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;
        }