private void AddToTable(IProtocolNode node, int count) { node?.Connections.ForEach(c => { if (!RoutingTable.Any(t => t.Item1.Contains(c))) { RoutingTable.Add(new Tuple <string, string, int>(c, node.Id, count)); } }); }
private void AddNodeRt(IProtocolNode node, int count) { if (node == null) { return; } List <Tuple <string, string, int> > tempTable = new List <Tuple <string, string, int> >(node.GetRoutingTable()); if (tempTable.Count < 1) { return; } tempTable.ForEach(c => { if (!RoutingTable.Any(t => t.Item1.Contains(c.Item1))) { RoutingTable.Add(new Tuple <string, string, int>(c.Item1, node.Id, count)); } }); }