/// <summary> /// Processes the request. /// </summary> /// <param name="requestMessage">The request message.</param> public override void ProcessRequest(RequestMessage requestMessage) { try { // Create a new audit entry MessageAuditEntry AuditEntry = new MessageAuditEntry(); // Seed values AuditEntry.Id = -1; AuditEntry.SourceSystem = requestMessage.SourceSystem; AuditEntry.DestinationSystem = requestMessage.DestinationSystem; AuditEntry.ReceivedDate = DateTime.Now; AuditEntry.Message = requestMessage.Body; AuditEntry.Sequence = requestMessage.Sequence; AuditEntry.Type = requestMessage.Type; AuditEntry.Name = requestMessage.Name; AuditEntry.Label = requestMessage.Label; AuditEntry.UpdatedBy = this.GetType().FullName; // Save the audit entry to the db AuditEntryController.SaveAuditEntry(AuditEntry); // Cache the audit entry for later use this.RequestProcessor.RequestDictionary["AuditEntry"] = AuditEntry; // All done Status = SubscriberStatusEnum.Processed; } catch (Exception ex) { // Store last error LastError = ex; // Failed Status = SubscriberStatusEnum.Failed; } }
/// <summary> /// Saves the item. /// </summary> /// <param name="auditEntry">The audit entry.</param> /// <returns></returns> internal int SaveItem(MessageAuditEntry auditEntry) { return(AuditEntryController.SaveAuditEntry(auditEntry)); }