It is a common practice to validate function arguments before running actual code. Usually validation looks like that: public void Update(Car entity) { if(entity ==null) throw new ArgumentNullException("entity"); } There is nothing wrong with this code, however we have to repeat this piece of code in every function. Of course we could create some helper class for argument validation and call approperiate validation function before launching...

[EN] Argument validation with attributes and Ninject interceptor

Windows 4194 dni, 19 godzin, 56 minut temu nocturn 33 pokaż kod licznika zwiń

Wczytywanie artykułów...

Najaktywniejsi w tym miesiącu