Exemplo n.º 1
0
        public static SynchronousParseCoordinator Create(IVBE vbe, string serializedDeclarationsPath = null)
        {
            var vbeEvents = MockVbeEvents.CreateMockVbeEvents(new Moq.Mock <IVBE>());
            var declarationFinderFactory = new DeclarationFinderFactory();
            var projectRepository        = new ProjectsRepository(vbe);
            var state = new RubberduckParserState(vbe, projectRepository, declarationFinderFactory, vbeEvents.Object);

            return(Create(vbe, state, projectRepository, serializedDeclarationsPath));
        }
Exemplo n.º 2
0
        public static (SynchronousParseCoordinator parser, IRewritingManager rewritingManager) CreateWithRewriteManager(IVBE vbe, string serializedComProjectsPath = null)
        {
            var vbeEvents = MockVbeEvents.CreateMockVbeEvents(new Mock <IVBE>());
            var declarationFinderFactory = new DeclarationFinderFactory();
            var projectRepository        = new ProjectsRepository(vbe);
            var state = new RubberduckParserState(vbe, projectRepository, declarationFinderFactory, vbeEvents.Object);

            return(CreateWithRewriteManager(vbe, state, projectRepository, serializedComProjectsPath));
        }
Exemplo n.º 3
0
        public static (SynchronousParseCoordinator parser, IRewritingManager rewritingManager) CreateWithRewriteManager(IVBE vbe, string serializedComProjectsPath = null, Mock <IVbeEvents> vbeEvents = null, IDictionary <string, IEnumerable <string> > documentModuleSupertypeNames = null)
        {
            var declarationFinderFactory = new DeclarationFinderFactory();
            var projectRepository        = new ProjectsRepository(vbe);
            var state = new RubberduckParserState(vbe, projectRepository, declarationFinderFactory, vbeEvents?.Object ?? MockVbeEvents.CreateMockVbeEvents(new Mock <IVBE>()).Object);

            return(CreateWithRewriteManager(vbe, state, projectRepository, serializedComProjectsPath, documentModuleSupertypeNames));
        }