Exemplo n.º 1
0
 public void Invoke(object obj, object @event, IEventBehaviorContext context)
 {
     try
     {
         var ctx = new ReflectionHelper.InvocationContext <IEventBehaviorContext>(@event, context);
         Method.Invoke(obj, Parameters.Select(x => x.Apply(ctx)).ToArray());
     }
     catch (Exception ex)
     {
         Console.WriteLine("Exception on the invocation");
         Console.WriteLine(ex);
         throw;
     }
 }
Exemplo n.º 2
0
 public void itemRemoved(ItemRemoved itemRemoved, IEventBehaviorContext ctx)
 {
     Cart.Remove(itemRemoved.ProductId);
 }