コード例 #1
0
 private void UpdateUser(ActionExecutingContext filterContext)
 {
     if (filterContext.HttpContext.User.Identity.IsAuthenticated)
     {
         var user = _userRepository.Get(int.Parse(filterContext.HttpContext.User.Identity.Name));
         _globalServices.OnlineUserRoutine(user, filterContext.HttpContext.Request.UserHostAddress);
     }
     else
     {
         _globalServices.OnlineUserRoutine(null, filterContext.HttpContext.Request.UserHostAddress);
     }
 }