Beispiel #1
0
        internal T4PsiModule([NotNull] Lifetime lifetime, [NotNull] IPsiModules psiModules, [NotNull] DocumentManager documentManager,
                             [NotNull] ChangeManager changeManager, [NotNull] IAssemblyFactory assemblyFactory, [NotNull] IShellLocks shellLocks,
                             [NotNull] IProjectFile projectFile, [NotNull] T4FileDataCache fileDataCache, [NotNull] T4Environment t4Environment,
                             [NotNull] OutputAssemblies outputAssemblies)
        {
            _lifetime = lifetime;
            lifetime.AddAction(Dispose);

            _psiModules      = psiModules;
            _assemblyFactory = assemblyFactory;
            _changeManager   = changeManager;

            _shellLocks = shellLocks;
            _project    = projectFile.GetProject();
            Assertion.AssertNotNull(_project, "_project != null");
            _solution = _project.GetSolution();

            changeManager.RegisterChangeProvider(lifetime, this);
            changeManager.AddDependency(lifetime, psiModules, this);

            _t4Environment    = t4Environment;
            _outputAssemblies = outputAssemblies;
            _resolveProject   = new T4ResolveProject(_solution, _shellLocks, t4Environment.PlatformID, _project);

            _sourceFile = CreateSourceFile(projectFile, documentManager);

            _isValid = true;
            fileDataCache.FileDataChanged.Advise(lifetime, OnDataFileChanged);
            AddBaseReferences();
        }
Beispiel #2
0
        internal T4PsiModule([NotNull] Lifetime lifetime, [NotNull] IPsiModules psiModules, [NotNull] DocumentManager documentManager,
            [NotNull] ChangeManager changeManager, [NotNull] IAssemblyFactory assemblyFactory, [NotNull] IShellLocks shellLocks,
            [NotNull] IProjectFile projectFile, [NotNull] T4FileDataCache fileDataCache, [NotNull] T4Environment t4Environment,
            [NotNull] OutputAssemblies outputAssemblies)
        {
            _lifetime = lifetime;
            lifetime.AddAction(Dispose);

            _psiModules = psiModules;
            _assemblyFactory = assemblyFactory;
            _changeManager = changeManager;

            _shellLocks = shellLocks;
            _project = projectFile.GetProject();
            Assertion.AssertNotNull(_project, "_project != null");
            _solution = _project.GetSolution();

            changeManager.RegisterChangeProvider(lifetime, this);
            changeManager.AddDependency(lifetime, psiModules, this);

            _t4Environment = t4Environment;
            _outputAssemblies = outputAssemblies;
            _resolveProject = new T4ResolveProject(_solution, _shellLocks, t4Environment.PlatformID, _project);

            _sourceFile = CreateSourceFile(projectFile, documentManager);

            _isValid = true;
            fileDataCache.FileDataChanged.Advise(lifetime, OnDataFileChanged);
            AddBaseReferences();
        }