I have a string of parameters that come in from a client. An example may be :
string param = "(NAME.FULLNAME AND DOB.OPTIONAL) OR (ID AND DOB.REQUIRED) OR (ID AND COUNTRY)"
Now, I have parsed out all the incoming data and have booleans representing each parameter.
Like :
bool name_FullName = true;
bool dob_Optional = false;
etc.
I'm trying to find the best way to evaluate the customer parameter expression to True or False.
I'm thinking just replace the parameters with their true/false bools. Then locate any TRUE AND TRUE
and removing them, and replacing TRUE AND FALSE
with false. Then evaluate the OR
expression i have left.
After typing it this seems like a good way to go. Does anyone have any faster solutions that I'm missing?