示例#1
0
        public Biz(
            ILoggerFactory loggerFactory,
            IConnectionFactory connectionFactory,
            IExchangeComDeclareParameters exchangeDeclareParameters,
            IQueueComDeclareParameters queueDeclareParameters,
            INotifierMediatorService notifierMediatorService,
            ITagGroupReady tagGroupReady,
            IAllTagGroupAllConnection allTagGroupAllConnection,
            IComponentContext componentContext
            )
        {
            _loggerFactory             = loggerFactory;
            _logger                    = _loggerFactory.CreateLogger <Biz>();
            _connectionFactory         = connectionFactory;
            _exchangeDeclareParameters = exchangeDeclareParameters;
            _queueDeclareParameters    = queueDeclareParameters;
            _notifierMediatorService   = notifierMediatorService;
            _tagGroupReady             = tagGroupReady;
            _allTagGroupAllConnection  = allTagGroupAllConnection;
            _componentContext          = componentContext;

            _machineName = Environment.MachineName;
            _logger.LogInformation("KBase.Business.Com startup machine name: " + _machineName);

            PersistentConnection = new DefaultRabbitMqPersistentConnection(_connectionFactory, _loggerFactory);
        }
示例#2
0
        public TransactionAsync(
            ILoggerFactory loggerFactory,
            IComponentContext componentContext,
            IConnectionFactory connectionFactory,
            IExchangeComDeclareParameters exchangeDeclareParameters,
            IQueueComDeclareParameters queueDeclareParameters,
            ICommandHandlerAsync commandHandlerAsync,
            ITagGroupReady tagGroupReady
            )
        {
            _loggerFactory             = loggerFactory;
            _logger                    = _loggerFactory.CreateLogger <TransactionAsync>();
            _componentContext          = componentContext;
            _connectionFactory         = connectionFactory;
            _exchangeDeclareParameters = exchangeDeclareParameters;
            _queueDeclareParameters    = queueDeclareParameters;
            _commandHandlerAsync       = commandHandlerAsync;
            _tagGroupReady             = tagGroupReady;

            //LoadGroups();
        }