public void DeleteAccountBan(AccountBan ban) { Contract.Requires(ban != null); ban.Delete(); RemoveAccountBan(ban); }
public AccountBan CreateAccountBan(Accounts.Account acc, string notes, DateTime?expiry) { Contract.Requires(acc != null); Contract.Ensures(Contract.Result <AccountBan>() != null); var rec = new AccountBanRecord(acc.Record) { Notes = notes, Expiry = expiry, }; rec.Create(); var ban = new AccountBan(rec); AddAccountBan(ban); return(ban); }
public void RemoveAccountBan(AccountBan ban) { Contract.Requires(ban != null); _accountBans.Remove(ban); }
public void AddAccountBan(AccountBan ban) { Contract.Requires(ban != null); _accountBans.Add(ban); }