Thanks for the detailed explanation. I should have run the unit test first.
The second solution seems to work but the problem is, the class library has to reference Clearscript. If I were to disable this check at all (IsRestrictedForScript always returns false), would I run into any issue? I ran all the unit test and there's no error at all. And it seems to ran a lot faster because it is not reading the attribute from the property.
The second solution seems to work but the problem is, the class library has to reference Clearscript. If I were to disable this check at all (IsRestrictedForScript always returns false), would I run into any issue? I ran all the unit test and there's no error at all. And it seems to ran a lot faster because it is not reading the attribute from the property.