예제 #1
0
        public static Event BetweenEvents(string name, Event afterEvent, ApproximateDateTimeOffset afterEventOffset, Event beforeEvent, ApproximateDateTimeOffset beforeEventOffset)
        {
            var relationships = new List <EventRelationship>();

            relationships.Add(new EventRelationship.After(afterEvent, afterEventOffset));
            relationships.Add(new EventRelationship.Before(beforeEvent, beforeEventOffset));

            return(new Event(name, relationships));
        }
예제 #2
0
 /// <summary>
 /// Subtracts an ApproximateDateTimeOffset from the current ApproximateDateTime
 /// </summary>
 /// <param name="offset"></param>
 public ApproximateDateTime SubtractOffset(ApproximateDateTimeOffset offset)
 {
     if (offset != null)
     {
         AddHours(-offset.Hours);
         AddDays(-offset.Days);
         AddMonths(-offset.Months);
         AddYears(-offset.Years);
     }
     return(this);
 }
예제 #3
0
 public Concurrent(Event concurrentEvent, ApproximateDateTimeOffset offset) : base(EventRelationshipType.Concurrent)
 {
     ConcurrentEventId = concurrentEvent.Id;
     ConcurrentEvent   = concurrentEvent;
     DateTimeOffset    = offset;
 }
예제 #4
0
 public Before(Event beforeEvent, ApproximateDateTimeOffset offset) : base(EventRelationshipType.Before)
 {
     BeforeEventId  = beforeEvent.Id;
     BeforeEvent    = beforeEvent;
     DateTimeOffset = offset;
 }
예제 #5
0
 public After(Event afterEvent, ApproximateDateTimeOffset offset) : base(EventRelationshipType.After)
 {
     AfterEventId   = afterEvent.Id;
     AfterEvent     = afterEvent;
     DateTimeOffset = offset;
 }
예제 #6
0
 public static Event ConcurrentEvent(string name, Event concurrentEvent, ApproximateDateTimeOffset offset)
 {
     return(new Event(name, new EventRelationship.Concurrent(concurrentEvent, offset)));
 }
예제 #7
0
 public static Event BeforeEvent(string name, Event beforeEvent, ApproximateDateTimeOffset offset)
 {
     return(new Event(name, new EventRelationship.Before(beforeEvent, offset)));
 }
예제 #8
0
 public static Event AfterEvent(string name, Event afterEvent, ApproximateDateTimeOffset offset)
 {
     return(new Event(name, new EventRelationship.After(afterEvent, offset)));
 }