private void StorageOnErrorRecieved(object sender, ErrorRecievedEventArgs errorRecievedEventArgs) { if (errorRecievedEventArgs.ErrorMessage is IErrorMessage message) { Execute(() => { _databaseLog.SetError(message); }); eventLog.WriteEntry( $"{message.Status}, messageId:{message.MessageId}, {message.ErrorMessage}", EventLogEntryType.Information); _ackQueue.Push(new AckQueueMessage() { MessageId = message.MessageId.ToString(), Valid = true }); } }
private async void BtnAck_OnItemClick(object sender, ItemClickEventArgs e) { await ForeachOnSelectedRows(delegate(Message message, CancellationToken token) { if (!message.NeedAck) { return; } var ackQueue = new AckQueue(Settings.Default.RABBIT_SERVER, Settings.Default.RABBIT_USER, Settings.Default.RABBIT_PASS); ackQueue.Push(new AckQueueMessage() { MessageId = message.MessageId.ToString(), Valid = true }); }, new ForEachOnSelectedRowsSettings() { OperationName = e.Item.Hint.ToString(), Refresh = true }); }