Urs Enzler
unread,Aug 11, 2010, 11:42:38 AM8/11/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to bbvcommon
Hi everyone
V 6.284 adds the evaluation engine to bbv.Common.
The evaluation engine will replace to bbv.Common.RuleEngine, which is
to cumbersome to use and add more flexibility in the way how
evaluations can be controlled.
At the moment, the basic infrastructure is present and part of the
validation block already known from the rule engine is available, too.
The syntax looks now like this:
this.engine = new EvaluationEngine();
this.engine.Solve<IsDataValid, IValidationResult>()
.WithAggregatorStrategy()
.AggregateWithValidationAggregator()
.ByEvaluating(q => new NameSetRule(q.Data))
.ByEvaluating(q => new DescriptionSetRule());
var answer = this.engine.Answer(new IsDataValid(new Data { Name =
"Tester", Description = "A tester" }));
The above example validates the Data object by evaluating two so
called expressions (formerly know as rules): NameSetRule and
DescriptionSetRule.
If you are interested, take a look at the acceptance tests in
bbv.Common.EvaluationEngine.Test/AcceptanceTests.
Cheers,
Urs
p.s. I have some problems with the uploader in google code, therefore
the sources are not yet available.