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.
When concurrently validating an instance of a class which uses
RequiredIfAttribute
, multiple threads share the same instance ofRequiredIfAttribute
(likely by design), and it breaks inExpressiveAttribute.AdjustMemberName
as it's settingPropertyType
to null on theRequiredIfAttribute
instance which is used by other threads, which might throwNullReferenceException
when thePropertyType
is null.