microdot
microdot copied to clipboard
Ensure recursive validation won't follow static properties
- At the moment, for an object with the following structure the validation will throw
StackOverflowException
. The pull request ensures that recursive validation won't follow static properties.
public class FooBar
{
//some properties...
public static FooBar Default { get; } = new FooBar();
}
- Also, it is possible to have deep enough object to cause
StackOverflowException
. The pull request ensures the recursion will throw if it goes deeper than 100 levels