private void DeleteDomains(string domainNamePrefix) { int deletedCount = 0; foreach (SdbTable table in SdbTable.ListTables(ServiceId, ServiceSecret)) { if (table.Name.StartsWith(domainNamePrefix)) { table.Delete(); deletedCount++; } } Console.WriteLine("Deleted {0} domains", deletedCount); }
private void ListDomains() { PrettyConsole console = new PrettyConsole(); console.AddColumn("Name", 64); console.AddColumn("ItemCount", 16); console.AddColumn("SizeBytes", 16); console.WriteHeader(); foreach (SdbTable table in SdbTable.ListTables(ServiceId, ServiceSecret)) { long itemCount; long sizeBytes; table.GetInfo(out itemCount, out sizeBytes); console.WriteLine(table.Name, itemCount, sizeBytes); } }