Exemplo n.º 1
0
        private static async Task prepareAndsaveRecordTask(CalendarLog logEntity)
        {
            Monitor.Enter(_syncLock);

            logEntity.Timestamp = Config.Instance.Now;
            _repoUnit.CalendarLog.Save(logEntity);

            Monitor.Exit(_syncLock);
        }
Exemplo n.º 2
0
 private static async void saveRecord(CalendarLog logEntity)
 {
     try { await prepareAndsaveRecordTask(logEntity); }
     catch (Exception exception) { Debug.WriteLine(exception); }
     finally
     {
         if (Monitor.IsEntered(_syncLock))
         {
             Monitor.Exit(_syncLock);
         }
     }
 }