public ContractJob(ILoggerProvider loggerProvider, NotificationDbContext dbContext, IMessageTransmitter transmitter) { DBContext = dbContext; Logger = loggerProvider.CreateLogger(nameof(ContractJob)); LoggerProvider = loggerProvider; Transmitter = transmitter; }
public override void Connect(IMessageTransmitter messageTransmitter) { base.Connect(messageTransmitter, ( IMessage message ) => { this.Dispatch <ConfigurationGetRequest>(message, this.OnRequestReceived); }); }
public override void Connect(IMessageTransmitter messageTransmitter) { base.Connect(messageTransmitter, ( IMessage message ) => { this.Dispatch <ArticleInfoRequest>(message, this.OnRequestReceived); }); }
public async Task ConnectAsync(IMessageTransmitter messageTransmitter, CancellationToken cancellationToken = default) { await Task.Run(() => { this.Connect(messageTransmitter); }, cancellationToken); }
public override void Connect(IMessageTransmitter messageTransmitter) { base.Connect(messageTransmitter, ( IMessage message ) => { this.Dispatch <ShoppingCartUpdateRequest>(message, this.OnRequestReceived); }); }
public override void Connect(IMessageTransmitter messageTransmitter) { base.Connect(messageTransmitter, ( IMessage message ) => { this.Dispatch <StockDeliverySetRequest>(message, this.OnRequestReceived); }); }
public override void Connect(IMessageTransmitter messageTransmitter) { base.Connect(messageTransmitter, ( IMessage message ) => { this.Dispatch <OutputMessage>(message, this.OnMessageReceived); }); }
public override void Connect(IMessageTransmitter messageTransmitter) { base.Connect(messageTransmitter, ( IMessage message ) => { this.Dispatch <TaskCancelOutputRequest>(message, this.OnRequestReceived); }); }
public JobMailsender(ILoggerProvider loggerProvider, NotificationDbContext dbContext, IMessageTransmitter transmitter, string notificationType, string mailTemplate) { DBContext = dbContext; Logger = loggerProvider.CreateLogger(nameof(ContractJob)); LoggerProvider = loggerProvider; NotificationType = notificationType; MailTemplate = mailTemplate; Transmitter = transmitter; }
protected override void ConnectDialogs(IMessageTransmitter messageTransmitter) { this.ArticleInfoDialog.Connect(messageTransmitter); this.ArticlePriceDialog.Connect(messageTransmitter); this.ArticleSelectedDialog.Connect(messageTransmitter); this.HelloDialog.Connect(messageTransmitter); this.KeepAliveDialog.Connect(messageTransmitter); this.ShoppingCartDialog.Connect(messageTransmitter); this.ShoppingCartUpdateDialog.Connect(messageTransmitter); this.UnprocessedDialog.Connect(messageTransmitter); }
public ImageManager( IConfigurationReader configurationReader, IUserIdManager userIdManager, IImageCapture imageCapture, IMessageTransmitter messageTransmitter, IOxfordClient oxfordClient) { _configurationReader = configurationReader; _userIdManager = userIdManager; _imageCapture = imageCapture; _messageTransmitter = messageTransmitter; _oxfordClient = oxfordClient; }
public void Connect(IMessageTransmitter messageTransmitter) { lock (this.SyncRoot) { if (this.MessageTransmitter is not null) { throw Assert.Exception(new InvalidOperationException("Dialog provider is already connected.")); } this.ConnectDialogs(messageTransmitter); messageTransmitter.MessageProcessingError += this.OnMessageProcessingError; messageTransmitter.Subscribe(( IMessage message ) => {}, ( Exception ex ) => {}, () => {}); messageTransmitter.Connect(); this.MessageTransmitter = messageTransmitter; } }
protected override void ConnectDialogs(IMessageTransmitter messageTransmitter) { this.ArticleInfoDialog.Connect(messageTransmitter); this.ArticleMasterSetDialog.Connect(messageTransmitter); this.HelloDialog.Connect(messageTransmitter); this.InitiateInputDialog.Connect(messageTransmitter); this.InputDialog.Connect(messageTransmitter); this.KeepAliveDialog.Connect(messageTransmitter); this.OutputDialog.Connect(messageTransmitter); this.OutputInfoDialog.Connect(messageTransmitter); this.StatusDialog.Connect(messageTransmitter); this.StockDeliveryInfoDialog.Connect(messageTransmitter); this.StockDeliverySetDialog.Connect(messageTransmitter); this.StockInfoDialog.Connect(messageTransmitter); this.StockLocationInfoDialog.Connect(messageTransmitter); this.TaskCancelOutputDialog.Connect(messageTransmitter); this.UnprocessedDialog.Connect(messageTransmitter); }
public void Start(Dictionary<string, string> config, Enkata.HostInfrastructure.Messaging.IMessageTransmitter<ActivityTrackerContracts.Messages.EventMessage> messageService) { _messageService = messageService; _logger.Info("Start method called"); try { _prj = new Monroe.Project.Monroe(); _act = new Activities(_messageService, _prj); } catch (Exception e) { string _exc = "Exception happend during creation of SHP, WorkUnit or Attributes instances: " + e.Message; _logger.Info(_exc); } _prj.Start(); }
public async Task ConnectAsync(Stream stream, CancellationToken cancellationToken = default) { if (this.IsConnected == true) { throw Assert.Exception(new InvalidOperationException("Connection has already been made.")); } IMessageTransmitter messageTransmitter = this.SerializationProvider.CreateMessageTransmitter(stream); try { await this.DialogProvider.ConnectAsync(messageTransmitter, cancellationToken); this.IsConnected = true; }catch { messageTransmitter.Dispose(); throw; } }
public void Connect(Stream stream) { if (this.IsConnected == true) { throw Assert.Exception(new InvalidOperationException("Connection has already been made.")); } IMessageTransmitter messageTransmitter = this.SerializationProvider.CreateMessageTransmitter(stream); try { this.DialogProvider.Connect(messageTransmitter); this.IsConnected = true; }catch { messageTransmitter.Dispose(); throw; } }
public virtual void Connect(IMessageTransmitter messageTransmitter) { this.MessageTransmitter = messageTransmitter; }
public DiMessageSender(IMessageTransmitter messageTransmitter) { this.messageTransmitter = messageTransmitter; }
protected virtual void Connect(IMessageTransmitter messageTransmitter, Action <IMessage> onNext) { this.MessageTransmitter = messageTransmitter; messageTransmitter.Subscribe(onNext); }
protected abstract void ConnectDialogs(IMessageTransmitter messageTransmitter);