Esempio n. 1
0
 internal ServiceResult?BeforeAction(CrudAction arg1, Model?_)
 {
     if (arg1.HasFlag(CrudAction.Commit))
     {
         _stopwatch.Restart();
     }
     return(null);
 }
Esempio n. 2
0
        internal ServiceResult?AfterAction(CrudAction arg1, Model?_)
        {
            if (arg1.HasFlag(CrudAction.Commit))
            {
                _stopwatch.Stop();
                Elapsed?.Invoke(this, _stopwatch.Elapsed.TotalMilliseconds.PushInto(_events));

                Notify(nameof(EventCount));
                Notify(nameof(AverageMs));
                Notify(nameof(MinMs));
                Notify(nameof(MaxMs));
            }
            return(null);
        }