private TestContainerDiscoverer([Import(typeof(SVsServiceProvider))] IServiceProvider serviceProvider, [Import(typeof(IOperationState))] IOperationState operationState)
        {
            ValidateArg.NotNull(serviceProvider, "serviceProvider");
            ValidateArg.NotNull(operationState, "operationState");

            this.fileRootMap   = new Dictionary <string, string>(StringComparer.OrdinalIgnoreCase);
            this.knownProjects = new Dictionary <string, ProjectInfo>(StringComparer.OrdinalIgnoreCase);

            this.serviceProvider = serviceProvider;

            this.testFilesAddRemoveListener = new TestFileAddRemoveListener(serviceProvider, Guids.NodejsBaseProjectFactory);
            this.testFilesAddRemoveListener.TestFileChanged += this.OnProjectItemChanged;

            this.solutionListener = new SolutionEventsListener(serviceProvider);
            this.solutionListener.ProjectLoaded    += this.OnProjectLoaded;
            this.solutionListener.ProjectUnloading += this.OnProjectUnloaded;
            this.solutionListener.ProjectClosing   += this.OnProjectUnloaded;
            this.solutionListener.ProjectRenamed   += this.OnProjectRenamed;
            this.solutionListener.BuildCompleted   += this.OnBuildCompleted;
            this.solutionListener.BuildStarted     += this.OnBuildStarted;

            this.testFilesUpdateWatcher = new TestFilesUpdateWatcher(serviceProvider);
            this.testFilesUpdateWatcher.FileChangedEvent += this.OnProjectItemChanged;
            operationState.StateChanged += this.OperationStateChanged;

            this.firstLoad = true;
        }
        public TestContainerDiscoverer(IServiceProvider serviceProvider,
                                       SolutionEventsListener solutionListener,
                                       TestFilesUpdateWatcher testFilesUpdateWatcher,
                                       TestFileAddRemoveListener testFilesAddRemoveListener,
                                       IOperationState operationState)
        {
            ValidateArg.NotNull(serviceProvider, "serviceProvider");
            ValidateArg.NotNull(solutionListener, "solutionListener");
            ValidateArg.NotNull(testFilesUpdateWatcher, "testFilesUpdateWatcher");
            ValidateArg.NotNull(testFilesAddRemoveListener, "testFilesAddRemoveListener");
            ValidateArg.NotNull(operationState, "operationState");

            this.fileRootMap   = new Dictionary <string, string>(StringComparer.OrdinalIgnoreCase);
            this.knownProjects = new Dictionary <string, ProjectInfo>(StringComparer.OrdinalIgnoreCase);

            this.serviceProvider = serviceProvider;

            this.testFilesAddRemoveListener = testFilesAddRemoveListener;
            this.testFilesAddRemoveListener.TestFileChanged += this.OnProjectItemChanged;

            this.solutionListener = solutionListener;
            this.solutionListener.ProjectLoaded    += this.OnProjectLoaded;
            this.solutionListener.ProjectUnloading += this.OnProjectUnloaded;
            this.solutionListener.ProjectClosing   += this.OnProjectUnloaded;
            this.solutionListener.ProjectRenamed   += this.OnProjectRenamed;
            this.solutionListener.BuildCompleted   += this.OnBuildCompleted;
            this.solutionListener.BuildStarted     += this.OnBuildStarted;

            this.testFilesUpdateWatcher = testFilesUpdateWatcher;
            this.testFilesUpdateWatcher.FileChangedEvent += this.OnProjectItemChanged;
            operationState.StateChanged += this.OperationStateChanged;

            this.firstLoad = true;
        }