Пример #1
0
 private static String[] removeContact(String[] tk)
 {
     if (tk.Length < 2)
     {
         return(str2arr("Missing arguments. Usage: removeContact <contactID>"));
     }
     return(str2arr(sm.removeEntity <Contact>(int.Parse(tk[1])) ? "Done." : "Error!"));
 }
Пример #2
0
        private static void removeOld(object state)
        {
            /*Cleanup*/
            TimeSpan pt = TimeSpan.Parse(Security.EnvironmentManagement.getEnvValue("pruningTime"));

            Storage.StorageManager sm = new Storage.StorageManager();

            var pbs = sm.getPublicationsExpired((int)pt.TotalDays);

            foreach (var it in pbs)
            {
                sm.removeEntity <Publication>(it.Key);
            }
        }
Пример #3
0
 public bool Remove()
 {
     if (sto.removeEntity <Storage.Model>(modelId))
     {
         wf_cache = null;
         modelId  = -1;
         userId   = -1;
         themeId  = -1;
         return(true);
     }
     else
     {
         return(false);
     }
 }