ActionRule allows to execute a delegate in reaction to property change.
In the example below webservice will be called after Number property is changed. Dependency is automatically managed AutomaticDependency.

var e = new Entity();
e.Extensions.CreateActionRule(en => CallWebService(en.Number) )
    .Start();

It can be specified manually which property change will trigger the action:

var e = new Entity();
e.Extensions.CreateActionRuleWithoutDependency(en => CallWebService(en.Number) )
    .WithDependencies(en => en.Number2)
    .Start();

Last edited Oct 14, 2010 at 7:26 PM by michalmac, version 1

Comments

No comments yet.