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; _projectFile = projectFile; IProject project = projectFile.GetProject(); Assertion.AssertNotNull(project, "project != null"); _project = project; _solution = project.GetSolution(); changeManager.RegisterChangeProvider(lifetime, this); changeManager.AddDependency(lifetime, psiModules, this); _t4Environment = t4Environment; _outputAssemblies = outputAssemblies; _resolveProject = new T4ResolveProject(lifetime, _solution, _shellLocks, t4Environment.PlatformID, project); _sourceFile = CreateSourceFile(projectFile, documentManager); _isValid = true; fileDataCache.FileDataChanged.Advise(lifetime, OnDataFileChanged); AddBaseReferences(); }
/// <summary> /// Initializes a new instance of the <see cref="AssemblyTransaction" /> class. /// </summary> /// <param name="assemblyFactory"></param> /// <param name="address">The address where the assembly code is injected.</param> /// <param name="autoExecute">Indicates whether the assembly code is executed once the object is disposed.</param> public AssemblyTransaction(IAssemblyFactory assemblyFactory, IntPtr address, bool autoExecute) { _assemblyFactory = assemblyFactory; IsAutoExecuted = autoExecute; Address = address; // Initialize the string builder Mnemonics = new StringBuilder(); }
/// <summary>Initializes a new instance of the <see cref="AssemblyTransaction" /> class.</summary> /// <param name="assemblyFactory"></param> /// <param name="autoExecute"> /// Indicates whether the assembly code is executed once the object is /// disposed. /// </param> /// <param name="executingThread">Thread to hijack. Will create a new thread if null.</param> public AssemblyTransaction(IAssemblyFactory assemblyFactory, bool autoExecute, IRemoteThread executingThread) : this(assemblyFactory, IntPtr.Zero, autoExecute, executingThread) { }
internal ProgramImpl( IPluginHandler pluginHandler, IFileSystem fileSystem, IAssemblyFactory assemblyFactory, IOutputter outputter) { this.pluginHandler = pluginHandler; this.fileSystem = fileSystem; this.assemblyFactory = assemblyFactory; this.outputter = outputter; }
/// <summary>Initializes a new instance of the <see cref="AssemblyTransaction" /> class.</summary> /// <param name="assemblyFactory"></param> /// <param name="address">The address where the assembly code is injected.</param> /// <param name="autoExecute"> /// Indicates whether the assembly code is executed once the object is /// disposed. /// </param> /// <param name="executingThread">Thread to hijack. Will create a new thread if null.</param> public AssemblyTransaction(IAssemblyFactory assemblyFactory, IntPtr address, bool autoExecute, IRemoteThread executingThread) { _assemblyFactory = assemblyFactory; _executingThread = executingThread; IsAutoExecuted = autoExecute; Address = address; // Initialize the string builder _mnemonics = new StringBuilder(); }
internal T4AssemblyReferenceManager( [NotNull] IAssemblyFactory assemblyFactory, [NotNull] IPsiSourceFile sourceFile, [NotNull] IProjectFile projectFile, [NotNull] IModuleReferenceResolveContext resolveContext, [NotNull] IShellLocks shellLocks ) { MyProjectReferences = new Dictionary <FileSystemPath, IProject>(); MyAssemblyReferences = new Dictionary <FileSystemPath, IAssemblyCookie>(); AssemblyFactory = assemblyFactory; ProjectFile = projectFile; ResolveContext = resolveContext; ShellLocks = shellLocks; SourceFile = sourceFile; Solution = ProjectFile.GetSolution(); AssemblyReferenceResolver = Solution.GetComponent <IT4AssemblyReferenceResolver>(); ProjectReferenceResolver = Solution.GetComponent <IT4ProjectReferenceResolver>(); Environment = Solution.GetComponent <IT4Environment>(); }
internal T4PsiModule([NotNull] Lifetime lifetime, [NotNull] PsiModuleManager psiModuleManager, [NotNull] DocumentManager documentManager, [NotNull] ChangeManager changeManager, [NotNull] IAssemblyFactory assemblyFactory, [NotNull] IShellLocks shellLocks, [NotNull] IProjectFile projectFile, [NotNull] T4FileDataCache fileDataCache, [NotNull] T4Environment t4Environment, [NotNull] OutputAssembliesCache outputAssembliesCache) { _lifetime = lifetime; lifetime.AddAction(Dispose); _psiModuleManager = psiModuleManager; _documentManager = documentManager; _assemblyFactory = assemblyFactory; _changeManager = changeManager; changeManager.RegisterChangeProvider(lifetime, this); changeManager.AddDependency(lifetime, psiModuleManager, this); _shellLocks = shellLocks; _projectFile = projectFile; _project = projectFile.GetProject(); Assertion.AssertNotNull(_project, "_project != null"); _solution = _project.GetSolution(); _t4Environment = t4Environment; _outputAssembliesCache = outputAssembliesCache; _resolveProject = new T4ResolveProject(_solution, _shellLocks, t4Environment.PlatformID, _project); _sourceFile = new PsiProjectFile( this, _projectFile, (pf, sf) => new DefaultPsiProjectFileProperties(pf, sf), JetFunc<IProjectFile, IPsiSourceFile>.True, _documentManager); _isValid = true; fileDataCache.FileDataChanged.Advise(lifetime, OnDataFileChanged); AddBaseReferences(); }
internal T4PsiModule([NotNull] Lifetime lifetime, [NotNull] PsiModuleManager psiModuleManager, [NotNull] DocumentManager documentManager, [NotNull] ChangeManager changeManager, [NotNull] IAssemblyFactory assemblyFactory, [NotNull] IShellLocks shellLocks, [NotNull] IProjectFile projectFile, [NotNull] T4FileDataCache fileDataCache, [NotNull] T4Environment t4Environment, [NotNull] OutputAssembliesCache outputAssembliesCache) { _lifetime = lifetime; lifetime.AddAction(Dispose); _psiModuleManager = psiModuleManager; _documentManager = documentManager; _assemblyFactory = assemblyFactory; _changeManager = changeManager; changeManager.RegisterChangeProvider(lifetime, this); changeManager.AddDependency(lifetime, psiModuleManager, this); _shellLocks = shellLocks; _projectFile = projectFile; _project = projectFile.GetProject(); Assertion.AssertNotNull(_project, "_project != null"); _solution = _project.GetSolution(); _t4Environment = t4Environment; _outputAssembliesCache = outputAssembliesCache; _resolveProject = new T4ResolveProject(_solution, _shellLocks, t4Environment.PlatformID, _project); _sourceFile = new PsiProjectFile( this, _projectFile, (pf, sf) => new DefaultPsiProjectFileProperties(pf, sf), JetFunc <IProjectFile, IPsiSourceFile> .True, _documentManager); _isValid = true; fileDataCache.FileDataChanged.Advise(lifetime, OnDataFileChanged); AddBaseReferences(); }
/// <summary> /// Initializes a new instance of the <see cref="AssemblyTransaction" /> class. /// </summary> /// <param name="assemblyFactory"></param> /// <param name="autoExecute">Indicates whether the assembly code is executed once the object is disposed.</param> public AssemblyTransaction(IAssemblyFactory assemblyFactory, bool autoExecute) : this(assemblyFactory, IntPtr.Zero, autoExecute) { }