示例#1
0
 //Called on background thread to persist the transaction data
 public void SaveObjects(IEntitySession session, IList<object> items)
 {
     foreach (TransactionLogEntry entry in items) {
     var entTrans = session.NewLogEntity<ITransactionLog>(entry);
     entTrans.Duration = entry.Duration;
     entTrans.RecordCount = entry.RecordCount;
     entTrans.Changes = entry.Changes;
       }
 }
示例#2
0
 public void SaveObjects(IEntitySession session, IList <object> items)
 {
     foreach (TransactionLogEntry entry in items)
     {
         var entTrans = session.NewLogEntity <ITransactionLog>(entry);
         entTrans.Duration    = entry.Duration;
         entTrans.RecordCount = entry.RecordCount;
         entTrans.Changes     = entry.Changes;
     }
 }
示例#3
0
        private void SaveEntries(IEntitySession session, IEnumerable <LogEntry> entries)
        {
            var ordered = entries.OrderBy(e => e.CreatedOn).ToList();

            if (ordered.Count == 0)
            {
                return;
            }
            var text = string.Join(Environment.NewLine, ordered);
            var iLog = session.NewLogEntity <IOperationLog>(ordered[0]);

            iLog.Message = text;
        }
示例#4
0
 private void SaveEntries(IEntitySession session, IEnumerable<LogEntry> entries)
 {
     var ordered = entries.OrderBy(e => e.CreatedOn).ToList();
       if (ordered.Count == 0)
     return;
       var text = string.Join(Environment.NewLine, ordered);
       if (Saving != null)
     Saving(this, new LogSaveEventArgs(text));
       var iLog = session.NewLogEntity<IOperationLog>(ordered[0]);
       iLog.Message = text;
 }
示例#5
0
 public void SaveObjects(IEntitySession session, IList<object> items)
 {
     foreach (SystemLogEntry entry in items) {
       var iLog = session.NewLogEntity<IOperationLog>(entry);
       iLog.Message = entry.ToString();
     }
 }