Exemple #1
0
        public void Begin(UserActionDetails parent, UserAction action)
        {
            this.ActionDetails.Parent       = parent;
            this.ActionDetails.UserId       = User;
            this.ActionDetails.ActionId     = action.Id;
            this.ActionDetails.CreatedTime  = DateTime.Now;
            this.ActionDetails.FinishedTime = new DateTime(2000, 1, 1);

            Repository.AddActionStatistics(ActionDetails);

            if (Began != null)
            {
                Began(this, new TrackerEventArgs(this));
            }
        }
Exemple #2
0
        public bool UpdateActionStatistics(UserActionDetails details)
        {
            var target = _context.UserActionStatistics.SingleOrDefault(item => item.Id == details.Id && item.UserId == details.UserId);

            if (target != null)
            {
                target.CreatedTime  = details.CreatedTime;
                target.FinishedTime = details.FinishedTime;
                target.Message      = details.Message;
                target.Result       = details.Result;
                target.UserId       = details.UserId;
                target.Result       = details.Result;
                return(_context.SaveChanges() == 0);
            }

            return(_context.SaveChanges() == 0);
        }
 public RuntimeModuleException(string moduleName, string message, Exception innerException, UserActionDetails details) : base(message, innerException)
 {
     this.ModuleName = moduleName;
     this.Details    = details;
 }
Exemple #4
0
 public bool AddActionStatistics(UserActionDetails details)
 {
     _context.UserActionStatistics.Add(details);
     return(_context.SaveChanges() == 0);
 }