public static string GetEncoded(NotificationLogId notificationLogId) { if (notificationLogId != null) { return notificationLogId.Encoded; } return null; }
public NotificationLogId Previous(int notificaitonsPerLog) { long previousLow = Math.Max(this.Low - notificaitonsPerLog, 1); long previousHigh = previousLow + notificaitonsPerLog - 1; NotificationLogId previous = new NotificationLogId(previousLow, previousHigh); if (Equals(previous)) { previous = null; } return previous; }
public NotificationLogId Next(int notificationsPerLog) { long nextLow = this.High + 1; long nextHigh = nextLow + notificationsPerLog; NotificationLogId next = new NotificationLogId(nextLow, nextHigh); if (Equals(next)) { next = null; } return next; }
public NotificationLog CreateNotificationLog(NotificationLogId notificationLogId) { long count = this._eventStore.CountStoredEvents(); return this.CreateNotificationLog(new NotificationLogInfo(notificationLogId, count)); }