I have an application where for each object the user can specify his own measurepoints. The values of theese measurements will then be used to classify the object as i e A - needs service, B - service should be scheduled within X days, C - no service needed ATM
However theese objects can be almost anything and there is no way we can hard code how the measured values should be aggregated to a classification, we need to leave that to the user.
Have you any suggestions on how we can provide a way for the user to enter his own formulas for this? It does not have to be idiot-proof, we dont have that many customers so we can assist them as long as they can explain it to us.
You should use .NET 3.5 Expressions, in System.Linq.Expressions. Scott Gu has provided a Dynamic Expression API that allows you to evaluate strings to turn them into expression trees, which may then be evaluated by code either to examine the expression contents, or compiled for execution.
http://weblogs.asp.net/scottgu/archive/2008/01/07/dynamic-linq-part-1-using-the-linq-dynamic-query-library.aspx