Ejemplo n.º 1
0
 public Transmission(User from, User to, TransmissionData transmissionData)
 {
     //// ReSharper disable DoNotCallOverridableMethodsInConstructor
     this.Sender = from;
     this.Receiver = to;
     this.TransmissionData = transmissionData;
     //// ReSharper restore DoNotCallOverridableMethodsInConstructor
     this.TimeSend = DateTime.UtcNow;
 }
        public static void UpdateOrAddUserToNotifiactionQuery(User user)
        {
            string key = USERS_PREFEX + user.UserId;

            if (HttpRuntime.Cache[key] == null)
            {
                HttpRuntime.Cache.Add(key, user, null, Cache.NoAbsoluteExpiration,
                        MaxUserTimeout, CacheItemPriority.Normal, OnRemoveCallback);
            }
            else
            {
                UpdateUserTimeout(user.UserId);
            }
        }