private void initialiseSeed()
 {
     foreach (Uri seed in initialSeeds)
     {
         String    domain    = seed.GetLeftPart(UriPartial.Authority);
         BackQueue backQueue = new BackQueue(domain);
         backQueue.Enqueue(seed);
         BackQueues.TryAdd(Interlocked.Increment(ref i), backQueue);
     }
 }
        private void addPathToFrontierIfTestsPassed(BackQueue b, IEnumerable <Uri> paths)
        {
            foreach (Uri path in paths)
            {
                String pathDomain = path.GetLeftPart(UriPartial.Authority);

                if (pathDomain.Equals(b.Domain))
                {
                    b.Enqueue(path);
                }

                else if (BackQueues.Any(x => x.Value.Domain.Equals(pathDomain)))
                {
                    BackQueues.First(x => x.Value.Domain.Equals(pathDomain)).Value.Enqueue(path);
                }

                else
                {
                    BackQueue newQueue = new BackQueue(pathDomain);
                    newQueue.Enqueue(path);
                    BackQueues.TryAdd(Interlocked.Increment(ref i), newQueue);
                }
            }
        }