Event Aggregation Call Handler


 Assembly  Events.PolicyInjection.dll
Namespace  Events.PolicyInjection
 Class  EventAggregationCallHandler
 From version 1.5

Call Handler Attribute

 Assembly  Events.PolicyInjection.dll
Namespace  Events.PolicyInjection
 Class  EventAggregationCallHandlerAttribute
 From version 1.5


The EventAggregationScopeCallHandlerAttribute makes it possible to decorate one or more methods in a class to enable the method for declarative event aggregation scoping. The attribute will do nothing if the class is not resolved through Unity with interception enabled.

The call handler supports the use of filtering options by providing the attribute with a type of an object which exposes the IScopeOptions interface.

Simple scoping (no aggregation):
public class LogicLayer : ILogicLayer
{
  [EventAggregationCallHandler]
  void Execute();
}


Simple scoping with custom filtering options:
public class LogicLayer : ILogicLayer
{
  [EventAggregationCallHandler(typeof(MyCustomFiltering))]
  void Execute();
}


As is the case with any other Unity interceptor, the EventAggregationCallHandler can be set in configuration by either editing the app.config file manually or editing it using Enterprise Library Config Editor.

Last edited Apr 24, 2012 at 8:23 PM by RasmusTherkelsen, version 2

Comments

No comments yet.