public void AddRange(Computer[] coms) { foreach (Computer computer in coms) { frameSended += computer.Received; } Computers.AddRange(coms); }
public void RebuildDatabase() { if (!sqlite) { Database.Delete(); Database.Create(); } Computers.AddRange(Node.Defaults); SaveChanges(); Binaries.AddRange(Binary.getBinaries()); ServerAccounts.AddRange(ServerAccount.Defaults); SaveChanges(); var defAcc = ServerAccounts.First(); defAcc.Nodes.Add(Node.Defaults[0]); defAcc.netmap.Add(new ServerAccount.NetMapNode(Node.Defaults[0].ip, "0,0")); SaveChanges(); }