public virtual IRoutingService DefineRules(RouterRules rules)
        {
            rules.Require(nameof(rules));

            rules.IsLocked = true;

            var backup = Rules;

            Rules = rules;

            try
            {
                ValidateState();
            }
            catch (Exception)
            {
                Rules = backup;
                throw;
            }

            foreach (var node in NodeQueue)
            {
                node.LatencyInterval = rules.NodeCheckInterval;
            }

            return(this);
        }
 public RoutingService()
 {
     Rules = new RouterRules();
 }