Example #1
0
        /// <summary>
        /// For stream work p2p services
        /// </summary>
        /// <returns></returns>
        public IQuantObserver <T> P2PQueue <T>()
        {
            IQuantObserver <T> observer = null;

            try
            {
                observer = new QuantObserverLogDecorator <T>(
                    new QuantObserver <T>(_config, _loger), _loger);
            }
            catch (QuantBaseException e)
            {
                _loger.Error(e, e.Message);
            }
            catch (Exception e)
            {
                _loger.Critical(e, e.Message);
            }
            return(observer);
        }
Example #2
0
        /// <summary>
        /// For stream work with RES flow
        /// </summary>
        /// <returns>IQuantObserver</returns>
        public IQuantObserver <QuantMessage> RouteQueue()
        {
            IQuantObserver <QuantMessage> observer = null;

            try
            {
                observer = new QuantObserverLogDecorator <QuantMessage>(
                    new QuantObserverRepoDecorator <QuantMessage>(
                        new QuantObserver <QuantMessage>(_config, _loger), _loger, _repo), _loger);
            }
            catch (QuantBaseException e)
            {
                _loger.Error(e, e.Message);
            }
            catch (Exception e)
            {
                _loger.Critical(e, e.Message);
            }
            return(observer);
        }