/// <summary> /// Explicitly tells to the engine that it should reply all events checking /// the version attribute. /// </summary> /// <returns></returns> public bool ShouldReplay() { Version currentVersionInDb = GetDatabaseVersionForThisDenormalizer(); DenormalizerVersionAttribute attribute = GetVersionAttribute(); //if the attribute is not present, denormalizer is not interested in replay return(attribute != null && attribute.Version > currentVersionInDb.CurrentVersion); }
public void EndReplay() { ExecuteInSession(session => { Version currentVersionInDb = GetDatabaseVersionForThisDenormalizer(); DenormalizerVersionAttribute attribute = GetVersionAttribute(); currentVersionInDb.CurrentVersion = attribute.Version; session.Update(currentVersionInDb); }); }