I am working on a system that receives thousands of requests per second, and essentially one of the tasks we are trying to avoid is to create unnecessary / additional objects .
We need to check the incoming request for 6 query elements per se.
I am thinking of creating a class for each element check.
However, I am trying to justify whether to use static validation classes against an object with instances containing HttpRequest as the instance field.
Should I use static classes or objects? what would you do?
Essentially, what I'm doing is injecting List<IValidator> validators to query the handler and iterate over it. but not sure if I should have an instance against static classes.
source share