@@ -7,8 +7,8 @@ namespace EntityDb.Common.Exceptions
77 /// <summary>
88 /// The exception that is logged when an actor passes a <see cref="ITransaction{TEntity}" /> to an
99 /// <see cref="ITransactionRepository{TEntity}" /> with a
10- /// <see cref="ITransactionCommand{TEntity}.ExpectedPreviousVersionNumber " /> unequal to the actual previous version
11- /// number.
10+ /// <see cref="ITransactionCommand{TEntity}.EntityVersionNumber " /> that is not the next number
11+ /// after the previous version number.
1212 /// </summary>
1313 /// <remarks>
1414 /// A program will not be able to catch this exception if it is thrown.
@@ -18,14 +18,14 @@ namespace EntityDb.Common.Exceptions
1818 public sealed class OptimisticConcurrencyException : Exception
1919 {
2020 /// <summary>
21- /// Throws a new <see cref="OptimisticConcurrencyException" /> if <paramref name="expectedPreviousVersionNumber " /> is
22- /// not equal to <paramref name="actualPreviousVersionNumber " />.
21+ /// Throws a new <see cref="OptimisticConcurrencyException" /> if <paramref name="nextVersionNumber " />
22+ /// is not the next number after <paramref name="previousVersionNumber " />.
2323 /// </summary>
24- /// <param name="expectedPreviousVersionNumber"> </param>
25- /// <param name="actualPreviousVersionNumber"> </param>
26- public static void ThrowIfMismatch ( ulong expectedPreviousVersionNumber , ulong actualPreviousVersionNumber )
24+ /// <param name="previousVersionNumber">The previous version number. </param>
25+ /// <param name="nextVersionNumber">The next version number. </param>
26+ public static void ThrowIfDiscontinuous ( ulong previousVersionNumber , ulong nextVersionNumber )
2727 {
28- if ( expectedPreviousVersionNumber != actualPreviousVersionNumber )
28+ if ( nextVersionNumber != previousVersionNumber + 1 )
2929 {
3030 throw new OptimisticConcurrencyException ( ) ;
3131 }
0 commit comments