Context
Parent issue #162 (point 6) identifies two BrilliantMessaging guards that accept either a positive TimeSpan or the standard .NET infinite-timeout sentinel. Expressing this with a generic predicate obscures the platform convention.
Proposed API
timeout.MustBePositiveOrInfinite();
The assertion should return the original value when it is greater than TimeSpan.Zero or exactly equals Timeout.InfiniteTimeSpan. It should reject zero and every other negative value. Default and custom-exception-factory overloads should follow the existing TimeSpan sign-guard conventions.
Scope
Context
Parent issue #162 (point 6) identifies two BrilliantMessaging guards that accept either a positive
TimeSpanor the standard .NET infinite-timeout sentinel. Expressing this with a generic predicate obscures the platform convention.Proposed API
The assertion should return the original value when it is greater than
TimeSpan.Zeroor exactly equalsTimeout.InfiniteTimeSpan. It should reject zero and every other negative value. Default and custom-exception-factory overloads should follow the existingTimeSpansign-guard conventions.Scope
MustBePositiveOrInfiniteforTimeSpanon all supported target frameworks.