Ejemplo n.º 1
0
        public SerializedErrorsInbox(IErrorsBacklog errorsBacklog)
        {
            _errorsBacklog = errorsBacklog;

            _errors          = new Subject <ErrorPayload>();
            _publishedErrors = _errors.Publish().RefCount();
        }
Ejemplo n.º 2
0
 public QueriesFactory(IErrorsInbox errorsInbox, IErrorsBacklog errorsBacklog, IErrorsBacklogReader errorsBacklogReader, IVisibilityPublisher visibilityPublisher, IVisibilityPersistor visibilityPersistor,
                       IBackendNotifier backendNotifier,
                       params Func <IBackendQuery>[] subscriptors)
 {
     _errorsInbox         = errorsInbox;
     _errorsBacklog       = errorsBacklog;
     _errorsBacklogReader = errorsBacklogReader;
     _visibilityPublisher = visibilityPublisher;
     _visibilityPersistor = visibilityPersistor;
     _backendNotifier     = backendNotifier;
     _subscriptors        = subscriptors;
 }
Ejemplo n.º 3
0
        public QueuedErrorsInbox(IErrorsBacklog errorsBacklog)
        {
            _errorsBacklog = errorsBacklog;

            Task.Run(() =>
            {
                //it will block here automatically waiting from new items to be added and it will not take cpu down
                foreach (var data in _queue.GetConsumingEnumerable())
                {
                    _errors.OnNext(data);
                }
            });

            _errors          = new Subject <ErrorPayload>();
            _publishedErrors = _errors.Publish().RefCount();
        }