ExpressiveAnnotations
ExpressiveAnnotations copied to clipboard
Concurrent validation using RequiredIfAttribute throws NullReferenceException
When concurrently validating an instance of a class which uses RequiredIfAttribute, multiple threads share the same instance of RequiredIfAttribute (likely by design), and it breaks in ExpressiveAttribute.AdjustMemberName as it's setting PropertyType to null on the RequiredIfAttribute instance which is used by other threads, which might throw NullReferenceException when the PropertyType is null.
PR: https://github.com/jwaliszko/ExpressiveAnnotations/pull/215