コード例 #1
0
        public async Task Process(InvalidReportReceived @event)
        {
            var invalidCaseReport = new InvalidCaseReport(@event.CaseReportId);

            invalidCaseReport.DataCollectorId     = @event.DataCollectorId;
            invalidCaseReport.Message             = @event.Message;
            invalidCaseReport.ParsingErrorMessage = @event.ErrorMessages;
            invalidCaseReport.Timestamp           = @event.Timestamp;
            await _invalidCaseReports.Save(invalidCaseReport);
        }
コード例 #2
0
        public void Process(InvalidReportReceived @event)
        {
            // Send the invalid report to the DB
            var invalidCaseReport = new InvalidCaseReport(@event.CaseReportId);

            //invalidCaseReport.TextMessageId = @event.tex
            invalidCaseReport.DataCollectorId     = @event.DataCollectorId;
            invalidCaseReport.Origin              = @event.Origin;
            invalidCaseReport.Message             = @event.Message;
            invalidCaseReport.ParsingErrorMessage = @event.ErrorMessages;
            invalidCaseReport.Timestamp           = @event.Timestamp;
            _invalidCaseReports.Save(invalidCaseReport);
        }
コード例 #3
0
        public void Process(InvalidReportReceived @event)
        {
            var invalidCaseReport = new InvalidCaseReport(@event.CaseReportId)
            {
                DataCollectorId     = @event.DataCollectorId,
                Message             = @event.Message,
                Origin              = @event.Origin,
                ParsingErrorMessage = @event.ErrorMessages,
                Timestamp           = @event.Timestamp
            };

            _invalidCaseReports.Insert(invalidCaseReport);
        }
コード例 #4
0
        public async Task Save(InvalidCaseReport caseReport)
        {
            var filter = Builders <InvalidCaseReport> .Filter.Eq(c => c.Id, caseReport.Id);

            await _collection.ReplaceOneAsync(filter, caseReport, new UpdateOptions { IsUpsert = true });
        }
コード例 #5
0
 public void Save(InvalidCaseReport caseReport)
 {
     _collection.ReplaceOne(_ => _.Id == caseReport.Id, caseReport, new UpdateOptions {
         IsUpsert = true
     });
 }