Example #1
0
 public AppLifecycleService(ILocalLogService logService,
                            IPublishSettingsService publishSettingsService,
                            ICommandProcessorService commandProcessorService)
 {
     _logService              = logService;
     _publishSettingsService  = publishSettingsService;
     _commandProcessorService = commandProcessorService;
 }
        public void Submit <TCommand>(TCommand cmd)
        {
            ICommandProcessorService channel = _channelFactory.CreateChannel();
            var jsonCmd = JsonConvert.SerializeObject(cmd);

            channel.Submit(cmd.GetType().ToString(), jsonCmd);
            ((IClientChannel)channel).Close();
        }
Example #3
0
 public UpdateService(BotDbContext dbContext, ICommandProcessorService commandProcessorService, ILogger <UpdateService> logger)
 {
     _commandProcessorService = (CommandProcessorService)commandProcessorService;
     _dbContext = dbContext;
     _logger    = logger;
 }