Dynamically loading & validating conditions from a file
I have got some 'n' rules in a file (text), each rule identifies, say, NETWORK_NAME.
Sample Rule:
(SERVICE == NULL && (STATUS == A && CHANNEL IN [UA,US])) || (VAL1 == NULL && VAL2 == NULL )) || (CIRCUIT== NULL && CODE == NULL)
which would typically be,
{
if(service==null){
if(status==A && (channel=UA || channel==US)){
flag=true;
}
}
elseif(val1==null && val2==null){
flag=true;
}
elseif(circuit==null && code=null){
flag=true;
}
return flag;
}
Now the question. Is it possible to dynamically parse the rule which i want to use and validate the same against the variables. Will reflection be of use in this case? If yes, any hints?
Thanks in advance.

