Beispiel #1
0
        public void Save(InvalidCaseReportFromUnknownDataCollector caseReport)
        {
            var filter = Builders <InvalidCaseReportFromUnknownDataCollector> .Filter.Eq(c => c.Id, caseReport.Id);

            _collection.ReplaceOne(filter, caseReport, new UpdateOptions {
                IsUpsert = true
            });
        }
        public void Process(InvalidReportFromUnknownDataCollectorReceived @event)
        {
            var invalidCaseReport = new InvalidCaseReportFromUnknownDataCollector(@event.CaseReportId);

            invalidCaseReport.PhoneNumber         = @event.Origin;
            invalidCaseReport.Message             = @event.Message;
            invalidCaseReport.ParsingErrorMessage = @event.ErrorMessages;
            invalidCaseReport.Timestamp           = _systemClock.GetCurrentTime();
            _invalidCaseReportsFromUnknownDataCollectors.Save(invalidCaseReport);
        }
        public async Task Process(InvalidReportFromUnknownDataCollectorReceived @event)
        {
            var invalidCaseReport = new InvalidCaseReportFromUnknownDataCollector(@event.CaseReportId);

            invalidCaseReport.PhoneNumber         = @event.Origin;
            invalidCaseReport.Message             = @event.Message;
            invalidCaseReport.ParsingErrorMessage = @event.ErrorMessages;
            invalidCaseReport.Timestamp           = @event.Timestamp;
            await _invalidCaseReportsFromUnknownDataCollectors.Save(invalidCaseReport);
        }
        public void Process(InvalidReportFromUnknownDataCollectorReceived @event)
        {
            var invalidCaseReport = new InvalidCaseReportFromUnknownDataCollector(@event.CaseReportId)
            {
                Message             = @event.Message,
                ParsingErrorMessage = @event.ErrorMessages,
                PhoneNumber         = @event.Origin,
                Timestamp           = @event.Timestamp
            };

            _invalidCaseReportsFromUnknownDataCollectors.Insert(invalidCaseReport);
        }
        public void Process(InvalidReportFromUnknownDataCollectorReceived @event)
        {
            // Send the invalid report to tbe DB
            var invalidCaseReport =
                new InvalidCaseReportFromUnknownDataCollector(@event.CaseReportId)
            {
                PhoneNumber         = @event.Origin,
                Message             = @event.Message,
                ParsingErrorMessage = @event.ErrorMessages,
                Timestamp           = @event.Timestamp
            };

            _invalidCaseReportsFromUnknownDataCollectors.Save(invalidCaseReport);
        }
Beispiel #6
0
 public void Save(InvalidCaseReportFromUnknownDataCollector caseReport)
 {
     _collection.ReplaceOne(_ => _.Id == caseReport.Id, caseReport, new UpdateOptions {
         IsUpsert = true
     });
 }