public void OnDocumentStructureChanged_NoopsIfDisposed()
        {
            // Arrange
            var parser = new DefaultVisualStudioRazorParser(
                Dispatcher,
                CreateDocumentTracker(),
                Mock.Of <RazorTemplateEngineFactoryService>(),
                new DefaultErrorReporter(),
                Mock.Of <ICompletionBroker>());

            parser.Dispose();

            // Act & Assert
            parser.OnDocumentStructureChanged(new object());
        }
        public void ReparseOnForeground_NoopsIfDisposed()
        {
            // Arrange
            var parser = new DefaultVisualStudioRazorParser(
                Dispatcher,
                CreateDocumentTracker(),
                Mock.Of <RazorTemplateEngineFactoryService>(),
                new DefaultErrorReporter(),
                Mock.Of <ICompletionBroker>());

            parser.Dispose();

            // Act & Assert
            parser.ReparseOnForeground(null);
        }
Esempio n. 3
0
        public void OnIdle_NoopsIfDisposed()
        {
            // Arrange
            var parser = new DefaultVisualStudioRazorParser(
                Dispatcher,
                CreateDocumentTracker(),
                ProjectEngineFactory,
                new DefaultErrorReporter(),
                Mock.Of <VisualStudioCompletionBroker>());

            parser.Dispose();

            // Act & Assert
            parser.OnIdle(null);
        }
Esempio n. 4
0
        public void OnDocumentStructureChanged_NoopsIfDisposed()
        {
            // Arrange
            var parser = new DefaultVisualStudioRazorParser(
                Dispatcher,
                CreateDocumentTracker(),
                ProjectEngineFactory,
                new DefaultErrorReporter(),
                Mock.Of <VisualStudioCompletionBroker>(MockBehavior.Strict));

            parser.Dispose();

            // Act & Assert
            parser.OnDocumentStructureChanged(new object());
        }
        public void OnIdle_NoopsIfDisposed()
        {
            // Arrange
            var parser = new DefaultVisualStudioRazorParser(
                JoinableTaskContext,
                CreateDocumentTracker(),
                ProjectEngineFactory,
                new DefaultErrorReporter(),
                Mock.Of <VisualStudioCompletionBroker>(MockBehavior.Strict));

            parser.Dispose();

            // Act & Assert
            parser.OnIdle();
        }
Esempio n. 6
0
 public void Dispose()
 {
     _parser.Dispose();
     _parserComplete.Dispose();
     _reparseComplete.Dispose();
 }
 public void Dispose()
 {
     _parser.Dispose();
 }