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