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!")); }
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); } }
public bool Remove() { if (sto.removeEntity <Storage.Model>(modelId)) { wf_cache = null; modelId = -1; userId = -1; themeId = -1; return(true); } else { return(false); } }