public UserEventSubscriber(IEventQueue queue, IQueryStore store) { queue.Subscribe <UserRegistrationStarted>(Handle); queue.Subscribe <UserRegistrationSucceeded>(Handle); queue.Subscribe <UserRegistrationFailed>(Handle); _store = store; }
public TransferEventSubscriber(IEventQueue queue, IQueryStore store, IQuerySearch search) { queue.Subscribe <TransferStarted>(Handle); queue.Subscribe <TransferUpdated>(Handle); queue.Subscribe <TransferCompleted>(Handle); _store = store; _search = search; }
public PersonEventSubscriber(IEventQueue queue, IQueryStore store) { _store = store; queue.Subscribe <PersonBoxed>(Handle); queue.Subscribe <PersonRegistered>(Handle); queue.Subscribe <PersonRenamed>(Handle); queue.Subscribe <PersonUnboxed>(Handle); }
public UserRegistrationProcessManager(ICommandQueue commander, IEventQueue publisher, IQuerySearch querySearch) { _commander = commander; _querySearch = querySearch; publisher.Subscribe <UserRegistrationStarted>(Handle); publisher.Subscribe <UserRegistrationSucceeded>(Handle); publisher.Subscribe <UserRegistrationFailed>(Handle); }
public TransferProcessManager(ICommandQueue commander, IEventQueue publisher, IEventRepository repository) { _commander = commander; _repository = repository; publisher.Subscribe <TransferStarted>(Handle); publisher.Subscribe <MoneyDeposited>(Handle); publisher.Subscribe <MoneyWithdrawn>(Handle); }
public AccountEventSubscriber(IEventQueue queue, IQueryStore store, IQuerySearch search) { queue.Subscribe <AccountOpened>(Handle); queue.Subscribe <AccountClosed>(Handle); queue.Subscribe <MoneyDeposited>(Handle); queue.Subscribe <MoneyWithdrawn>(Handle); _store = store; _search = search; }
public UmbrellaProcessManager(ICommandQueue commander, IEventQueue publisher, IQuerySearch querySearch) { _querySearch = querySearch; publisher.Subscribe <TransferStarted>(Handle); commander.Override <RenamePerson>(Handle, Tenants.Umbrella.Identifier); }
public IDisposable Subscribe(Action <T> handler) { return(queue.Subscribe <T>(evt => { if (filter(evt)) { handler(evt); } })); }
public LoaderService(IEventQueue queue, TimeSpan throttling, ILog log = null, ICache cache = null) { this.queue = queue; this.throttling = throttling; this.log = log; this.cache = cache; eventSubscribtion = queue.Subscribe <LoadPageEvent>(LoadPage); }
public CachingService(IEventQueue queue, ICache cache) { this.cache = cache; this.subscribtion = queue.Subscribe <ContentLoadedEvent>(CacheItem); }