public void ThrowOnTreeishConflict(DepWithParent depWithParent)
 {
     if (container.ContainsKey(depWithParent.Dep.Name))
     {
         TreeishManager.ThrowOnTreeishConflict(depWithParent, container[depWithParent.Dep.Name]);
     }
 }
 public void Add(DepWithParent depWithParent)
 {
     if (!container.ContainsKey(depWithParent.Dep.Name))
     {
         container[depWithParent.Dep.Name] = new List <DepWithParent>();
     }
     container[depWithParent.Dep.Name].Add(depWithParent);
 }
        public static void ThrowOnTreeishConflict(DepWithParent depWithParent, IList <DepWithParent> processed)
        {
            var conflictDep =
                processed.FirstOrDefault(d => d.Dep.Treeish != null && !d.Dep.Treeish.Equals(depWithParent.Dep.Treeish));

            if (conflictDep != null && depWithParent.Dep.Treeish != null && conflictDep.Dep.Treeish != null && !conflictDep.Dep.Treeish.Trim().Equals(""))
            {
                throw new TreeishConflictException(
                          string.Format("Treeish conflict: {0} refers to {4}:{1}, while {2} refers to {4}:{3}",
                                        depWithParent.ParentModule, depWithParent.Dep.Treeish, conflictDep.ParentModule, conflictDep.Dep.Treeish, conflictDep.Dep.Name));
            }
        }
 public void Add(DepWithParent dep)
 {
     queue.Enqueue(dep);
 }