public static TestDomainDependencyGraph BuildGraph(
            string[] testAssemblies,
            string[] assemblyPaths,
            IFixtureFilter fixtureFilter,
            IRunPipeFilter runPipeFilter,
            bool verbose
            )
        {
            // MLS 12/21/05 - adding verbose parameter to fix MBUNIT-28 (verbose command line option not working).
            // IDEA: A more flexible solution might be to pass in a collection of IRunPipeListeners.

            if (testAssemblies == null)
                throw new ArgumentNullException("testAssemblies");
            if (testAssemblies.Length == 0)
                throw new ArgumentException("No assembly to test");
            if (fixtureFilter == null)
                throw new ArgumentNullException("fixtureFilter");
            if (runPipeFilter == null)
                throw new ArgumentNullException("runPipeFilter");

            Hashtable loadedAssemblies = new Hashtable();
            TestDomainDependencyGraph graph = null;
            try
            {
                graph = new TestDomainDependencyGraph();
                graph.verbose = verbose;
                if (assemblyPaths != null)
                    graph.AssemblyPaths.AddRange(assemblyPaths);
                foreach (string testAssembly in testAssemblies)
                {
                    if (loadedAssemblies.Contains(testAssembly))
                        continue;

                    TestDomain domain = new TestDomain(testAssembly);

                    domain.Filter = fixtureFilter;
                    domain.RunPipeFilter = runPipeFilter;
                    graph.AddDomain(domain);
                    loadedAssemblies.Add(testAssembly, null);
                }
                graph.CreateDependencies();

                return graph;
            }
            catch(Exception ex)
            {
                if (graph != null)
                {
                    graph.Dispose();
                    graph = null;
                }
                throw new ApplicationException("Failed loading assemblies", ex);
            }
        }