コード例 #1
0
        /// <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);
        }
コード例 #2
0
 public void EndReplay()
 {
     ExecuteInSession(session =>
     {
         Version currentVersionInDb             = GetDatabaseVersionForThisDenormalizer();
         DenormalizerVersionAttribute attribute = GetVersionAttribute();
         currentVersionInDb.CurrentVersion      = attribute.Version;
         session.Update(currentVersionInDb);
     });
 }