Ejemplo n.º 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));
        }
Ejemplo n.º 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);
 }
Ejemplo n.º 3
0
 public Concurrent(Event concurrentEvent, ApproximateDateTimeOffset offset) : base(EventRelationshipType.Concurrent)
 {
     ConcurrentEventId = concurrentEvent.Id;
     ConcurrentEvent   = concurrentEvent;
     DateTimeOffset    = offset;
 }
Ejemplo n.º 4
0
 public Before(Event beforeEvent, ApproximateDateTimeOffset offset) : base(EventRelationshipType.Before)
 {
     BeforeEventId  = beforeEvent.Id;
     BeforeEvent    = beforeEvent;
     DateTimeOffset = offset;
 }
Ejemplo n.º 5
0
 public After(Event afterEvent, ApproximateDateTimeOffset offset) : base(EventRelationshipType.After)
 {
     AfterEventId   = afterEvent.Id;
     AfterEvent     = afterEvent;
     DateTimeOffset = offset;
 }
Ejemplo n.º 6
0
 public static Event ConcurrentEvent(string name, Event concurrentEvent, ApproximateDateTimeOffset offset)
 {
     return(new Event(name, new EventRelationship.Concurrent(concurrentEvent, offset)));
 }
Ejemplo n.º 7
0
 public static Event BeforeEvent(string name, Event beforeEvent, ApproximateDateTimeOffset offset)
 {
     return(new Event(name, new EventRelationship.Before(beforeEvent, offset)));
 }
Ejemplo n.º 8
0
 public static Event AfterEvent(string name, Event afterEvent, ApproximateDateTimeOffset offset)
 {
     return(new Event(name, new EventRelationship.After(afterEvent, offset)));
 }