public void Dispose()
        {
            _dteWithEvents.OnBuildDone -= BuildEventsOnOnBuildDone;
            SaveStepMap();

            GherkinProcessingScheduler.Dispose();
            if (_appConfigTracker != null)
            {
                _appConfigTracker.FileChanged    -= ConfigFileTrackerOnFileChanged;
                _appConfigTracker.FileOutOfScope -= ConfigFileTrackerOnFileOutOfScope;
                _appConfigTracker.Dispose();
            }
            if (_specflowJsonTracker != null)
            {
                _specflowJsonTracker.FileChanged    -= ConfigFileTrackerOnFileChanged;
                _specflowJsonTracker.FileOutOfScope -= ConfigFileTrackerOnFileOutOfScope;
                _specflowJsonTracker.Dispose();
            }
            if (_stepSuggestionProvider != null)
            {
                _stepSuggestionProvider.Dispose();
            }
            if (_featureFilesTracker != null)
            {
                _featureFilesTracker.Ready -= FeatureFilesTrackerOnReady;
                _featureFilesTracker.Dispose();
            }
            if (_bindingFilesTracker != null)
            {
                _bindingFilesTracker.Dispose();
            }
        }
Ejemplo n.º 2
0
 public NoProjectScope(GherkinFileEditorClassifications classifications, IVisualStudioTracer visualStudioTracer, IIntegrationOptionsProvider integrationOptionsProvider)
 {
     GherkinTextBufferParser    = new GherkinTextBufferParser(this, visualStudioTracer);
     GherkinProcessingScheduler = new GherkinProcessingScheduler(visualStudioTracer, false);
     SpecFlowConfiguration      = ConfigurationLoader.GetDefault();
     GherkinDialectServices     = new GherkinDialectServices(SpecFlowConfiguration.FeatureLanguage);
     Classifications            = classifications;
     IntegrationOptionsProvider = integrationOptionsProvider;
     Tracer = visualStudioTracer;
 }
        public VsProjectScope(Project project, DteWithEvents dteWithEvents, GherkinFileEditorClassifications classifications, IVisualStudioTracer tracer, IIntegrationOptionsProvider integrationOptionsProvider)
        {
            Classifications             = classifications;
            _project                    = project;
            _dteWithEvents              = dteWithEvents;
            _tracer                     = tracer;
            _integrationOptionsProvider = integrationOptionsProvider;

            var integrationOptions = integrationOptionsProvider.GetOptions();

            _parser = new GherkinTextBufferParser(this, tracer);
//TODO: enable when analizer is implemented
//            if (integrationOptions.EnableAnalysis)
//                analyzer = new GherkinScopeAnalyzer(this, visualStudioTracer);

            GherkinProcessingScheduler = new GherkinProcessingScheduler(tracer, integrationOptions.EnableAnalysis);

            GeneratorServices = new VsGeneratorServices(project, new VsSpecFlowConfigurationReader(project, tracer), tracer, integrationOptionsProvider);
        }