// /** // * File: CrawlPool.cs // * Author: haraldwolff // * // * This file and it's content is copyrighted by the Author and / or copyright holder. // * Any use wihtout proper permission is illegal and may lead to legal actions. // * // * // **/ using System; using System.Collections.Generic; using ln.types; namespace ln.skyscanner.entities { public class CrawlPool { public Dictionary Subnets = new Dictionary(); public Dictionary Nodes = new Dictionary(); public Dictionary Checks = new Dictionary(); public CrawlPool() { } public Subnet GetSubnet(CIDR network) { if (Subnets.ContainsKey(network)) return Subnets[network]; Subnet subnet = new Subnet(network); Subnets.Add(network,subnet); return subnet; } public Node GetNode(CIDR ip) { if (Nodes.ContainsKey(ip)) return Nodes[ip]; Node node = new Node(ip); Nodes[ip] = node; return node; } } }