public UnityReferencesTracker( Lifetime lifetime, IEnumerable <IUnityReferenceChangeHandler> handlers, ISolution solution, ISolutionLoadTasksScheduler scheduler, ModuleReferenceResolveSync moduleReferenceResolveSync, ChangeManager changeManager, IViewableProjectsCollection projects, ILogger logger, UnityVersion unityVersion) { myAllProjectLifetimes = new Dictionary <IProject, Lifetime>(); myUnityProjects = new HashSet <IProject>(); myHandlers = handlers.ToList(); myLifetime = lifetime; myLogger = logger; mySolution = solution; myModuleReferenceResolveSync = moduleReferenceResolveSync; myChangeManager = changeManager; myProjects = projects; // At PreparePsiModules, we know what references we have, so we know if we're a Unity project. This is where // we'll initialise our custom PSI module. We have to initialise our PSI module before Done, or the // PersistentIndexManager will clean out the "orphaned" external (YAML) files and we'll have to reparse all // files on every startup scheduler.EnqueueTask(new SolutionLoadTask("Preparing Unity project", SolutionLoadTaskKinds.PreparePsiModules, OnSolutionPreparePsiModules)); HasUnityReference.WhenTrue(lifetime, lt => unityVersion.UpdateActualVersionForSolution()); }
public ExtWire() { Connected.WhenTrue(Lifetime.Eternal, _ => { lock (mySendQ) { while (mySendQ.Count > 0) { var p = mySendQ.Dequeue(); RealWire.Send(p.Key, writer => writer.WriteRaw(p.Value)); } } }); }