1
0
mirror of synced 2026-04-18 22:38:41 +08:00

限定TopOverCostCount范围

This commit is contained in:
yitter
2022-07-16 00:42:36 +08:00
parent 519206cdbf
commit b1b3d0cd6d
12 changed files with 165 additions and 84 deletions

View File

@@ -92,6 +92,12 @@ namespace Yitter.IdGenerator
throw new ApplicationException("MinSeqNumber error. (range:[5, " + maxSeqNumber + "]");
}
// 7.TopOverCostCount
if (options.TopOverCostCount < 0 || options.TopOverCostCount > 10000)
{
throw new ApplicationException("TopOverCostCount error. (range:[0, 10000]");
}
switch (options.Method)
{
case 2: