Hi,
I’m in a situation where I need to ensure an instant is within range when validating arguments to a method.
What is the best practice for this:
To include both the minimum and maximum values, or have a half-open range excluding one value.
I’m looking to make this reusable using PostSharp, so would be interested as to what other people have done.
Thanks,
Sean
--
---
You received this message because you are subscribed to the Google Groups "Noda Time" group.
To unsubscribe from this group and stop receiving emails from it, send an email to noda-time+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/noda-time/DB7PR05MB565965243807903FE839F4CCC6CF0%40DB7PR05MB5659.eurprd05.prod.outlook.com.
Hi,
Is there a reason the Instant.IsValid method and the Instant.MinValue/Instant.MaxValue are all internal?
It seems like these would be useful methods/fields to have exposed publicly.
Thanks,
Sean
To view this discussion on the web visit https://groups.google.com/d/msgid/noda-time/CA%2B5fHtLAuX%2BLNgsT4GaBU9B8BpULfpb%3DVSVrSjA2TmtgC%2BX5Ww%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/noda-time/DB7PR05MB56594E53DA311EE78624B1EEC6C20%40DB7PR05MB5659.eurprd05.prod.outlook.com.
Sorry, my fault, I meant Instant.BeforeMinValue.
Essentially, I need to create an instant that is completely invalid and is before the MinValue.
I would like not to have to use reflection. Is there anything in the testing assembly to do this?
Thanks,
Sean.
To view this discussion on the web visit https://groups.google.com/d/msgid/noda-time/CA%2B5fHtJyNuTUWoJbdTRybpquF6HBFaaZM-qEDg9-0YZy7gO2Xg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/noda-time/DB7PR05MB5659A43EC406113C2A9A833EC6C30%40DB7PR05MB5659.eurprd05.prod.outlook.com.