microdot icon indicating copy to clipboard operation
microdot copied to clipboard

Ensure recursive validation won't follow static properties

Open myarichuk opened this issue 4 years ago • 0 comments

  1. 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();
}
  1. 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

myarichuk avatar Nov 23 '20 15:11 myarichuk