Beispiel #1
0
 public static void Set <T>(int nodecode, String name, T setted)
 {
     if (Equals(setted, default(T)))
     {
         UrbeCache.Delete(typeof(T), TranslateKey(nodecode, name));
     }
     else
     {
         UrbeCache.Store(typeof(T), TranslateKey(nodecode, name), setted);
     }
 }
        private static String GetEmployeeRfidAction(String rfid)
        {
            var key = String.Format("employeeRfid:{0}", rfid);

            if (UrbeCache.KeyExists(typeof(String), key))
            {
                UrbeCache.Delete(typeof(String), key);

                return(MessageCode.RfidEmployeeLogout.GetMessageCode());
            }

            UrbeCache.Store(typeof(String), key, rfid);

            return(MessageCode.RfidEmployeeLogin.GetMessageCode());
        }