Exemplo n.º 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;
       }
 }
Exemplo n.º 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;
     }
 }
Exemplo n.º 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;
        }
Exemplo n.º 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;
 }
Exemplo n.º 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();
     }
 }