1
Vote

HasValue() plugin for Nullable<T>

description

Hi,

I am trying to create a plugin that verifies Nullable<> arguments... it should cause an argument exception, in case the HasValue-property returns false. Of course, one could mention that I should just not use a Nullable than, but that´s not an option...

I checked your plugin example on the main page... but I´ve actually a problem implementing the Factory and Cache (I struggle with the check expression, because Nullable is an open type, but I can´t use any open type with the factory).

Any idea?

Kind regards

comments