New alpha release V6.284 introduces Evaluation Engine

4 views
Skip to first unread message

Urs Enzler

unread,
Aug 11, 2010, 11:42:38 AM8/11/10
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.

Urs Enzler

unread,
Aug 12, 2010, 9:58:12 AM8/12/10
to bbvcommon
Just an update: the sources can now be downloaded from
http://code.google.com/p/bbvcommon/downloads/list
Reply all
Reply to author
Forward
0 new messages