/// <summary>
 /// Adds background handler to the collection. <paramref name="handler"/> will be invoked on <paramref name="trigger"/>.
 /// </summary>
 /// <param name="trigger">Invocation trigger for <paramref name="handler"/>.</param>
 /// <param name="handler">Background handler to add.</param>
 /// <returns>Self (for fluency).</returns>
 public BackgroundServiceCollection AddHandler(IServiceTrigger trigger, IBackgroundHandler handler)
 {
     Ensure.NotNull(trigger, "trigger");
     Ensure.NotNull(handler, "worker");
     handlers.Add(new KeyValuePair <IServiceTrigger, IBackgroundHandler>(trigger, handler));
     return(this);
 }
 public PayingItemServiceTriggerDecorator(IPayingItemService payingItemService,
                                          IServiceTrigger <PayingItem> serviceTrigger,
                                          ICategoryService categoryService,
                                          ITypeOfFlowService typeOfFlowService)
 {
     _payingItemService = payingItemService;
     _serviceTrigger    = serviceTrigger;
     _categoryService   = categoryService;
     _typeOfFlowService = typeOfFlowService;
 }
Ejemplo n.º 3
0
 public PayingItemService(
     IRepository <PayingItem> repository,
     IServiceTrigger <PayingItem> serviceTrigger,
     ICategoryService categoryService,
     ITypeOfFlowService typeOfFlowService)
 {
     _repository        = repository;
     _serviceTrigger    = serviceTrigger;
     _categoryService   = categoryService;
     _typeOfFlowService = typeOfFlowService;
 }