You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@reef.apache.org by Markus Weimer <ma...@weimo.de> on 2016/05/05 18:34:10 UTC

Equivalent of Validate in C#?

Hi,

while reviewing the EvaluatorManager, I wondered whether there is an
equivalent to the Validate Class[0] in C#? It allows for quick,
one-line validations of parameters. If there isn't one, it might be a
good candidate for REEF-Utilitities.

Markus



[0]: https://commons.apache.org/proper/commons-lang/javadocs/api-3.1/org/apache/commons/lang3/Validate.html

Re: Equivalent of Validate in C#?

Posted by Markus Weimer <ma...@weimo.de>.
Yes, thanks! We should use that instead of custom checks :)

Markus

On Thu, May 5, 2016 at 10:57 PM, Anupam <an...@gmail.com> wrote:
> Are you looking for something like C# code contracts:
> https://msdn.microsoft.com/en-us/library/dd264808(v=vs.110).aspx ?
>
>
>
> On 5 May 2016 at 11:34, Markus Weimer <ma...@weimo.de> wrote:
>> Hi,
>>
>> while reviewing the EvaluatorManager, I wondered whether there is an
>> equivalent to the Validate Class[0] in C#? It allows for quick,
>> one-line validations of parameters. If there isn't one, it might be a
>> good candidate for REEF-Utilitities.
>>
>> Markus
>>
>>
>>
>> [0]: https://commons.apache.org/proper/commons-lang/javadocs/api-3.1/org/apache/commons/lang3/Validate.html
>
>
>
> --
> Anupam
> Bellevue, WA
> Ph: +1 (425)-777-5570

Re: Equivalent of Validate in C#?

Posted by Anupam <an...@gmail.com>.
Are you looking for something like C# code contracts:
https://msdn.microsoft.com/en-us/library/dd264808(v=vs.110).aspx ?



On 5 May 2016 at 11:34, Markus Weimer <ma...@weimo.de> wrote:
> Hi,
>
> while reviewing the EvaluatorManager, I wondered whether there is an
> equivalent to the Validate Class[0] in C#? It allows for quick,
> one-line validations of parameters. If there isn't one, it might be a
> good candidate for REEF-Utilitities.
>
> Markus
>
>
>
> [0]: https://commons.apache.org/proper/commons-lang/javadocs/api-3.1/org/apache/commons/lang3/Validate.html



-- 
Anupam
Bellevue, WA
Ph: +1 (425)-777-5570