public EntityHandler( IActiveHandler <TEntity> activateHandler, IAddHandler <TEntity> addHandler, IRemoveHandler <TKey> removeHandler) { ActivateHandler = activateHandler ?? throw new ArgumentNullException(nameof(activateHandler)); AddHandler = addHandler ?? throw new ArgumentNullException(nameof(addHandler)); RemoveHandler = removeHandler ?? throw new ArgumentNullException(nameof(removeHandler)); }
public Subscription(IRemoveHandler d, Type evnt, Action <IDomainEvent> handler) { if (d == null) { throw new ArgumentNullException("d"); } if (handler == null) { throw new ArgumentNullException("handler"); } _manager = d; _event = evnt; _handler = handler; }