Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
adityasa committed Jan 2, 2025
1 parent 506a9b9 commit 46040e1
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public static TryCatch<IQueryPipelineStage> MonadicCreate(

if (hybridSearchQueryInfo.Skip != null)
{
if (hybridSearchQueryInfo.Skip.Value < 0 || hybridSearchQueryInfo.Skip.Value > int.MaxValue)
if (hybridSearchQueryInfo.Skip.Value > int.MaxValue)
{
throw new ArgumentOutOfRangeException("skipCount");
}
Expand All @@ -125,7 +125,7 @@ public static TryCatch<IQueryPipelineStage> MonadicCreate(

if (hybridSearchQueryInfo.Take != null)
{
if (hybridSearchQueryInfo.Take.Value < 0 || hybridSearchQueryInfo.Take.Value > int.MaxValue)
if (hybridSearchQueryInfo.Take.Value > int.MaxValue)
{
throw new ArgumentOutOfRangeException("takeCount");
}
Expand Down Expand Up @@ -276,7 +276,7 @@ public static TryCatch<IQueryPipelineStage> MonadicCreate(

if (queryInfo.HasOffset)
{
if (queryInfo.Offset.Value < 0 || queryInfo.Offset.Value > int.MaxValue)
if (queryInfo.Offset.Value > int.MaxValue)
{
throw new ArgumentOutOfRangeException("offsetCount");
}
Expand All @@ -292,7 +292,7 @@ public static TryCatch<IQueryPipelineStage> MonadicCreate(

if (queryInfo.HasLimit)
{
if (queryInfo.Limit.Value < 0 || queryInfo.Limit.Value > int.MaxValue)
if (queryInfo.Limit.Value > int.MaxValue)
{
throw new ArgumentOutOfRangeException("limitCount");
}
Expand All @@ -308,7 +308,7 @@ public static TryCatch<IQueryPipelineStage> MonadicCreate(

if (queryInfo.HasTop)
{
if (queryInfo.Top.Value < 0 || queryInfo.Top.Value > int.MaxValue)
if (queryInfo.Top.Value > int.MaxValue)
{
throw new ArgumentOutOfRangeException("topCount");
}
Expand Down

0 comments on commit 46040e1

Please sign in to comment.