Boo.BooLangProject.BooProjectSources.StartWatchingHierarchy C# (CSharp) Метод

StartWatchingHierarchy() публичный Метод

public StartWatchingHierarchy ( IVsHierarchy hierarchy ) : void
hierarchy IVsHierarchy
Результат void
        public void StartWatchingHierarchy(IVsHierarchy hierarchy)
        {
            hierarchyListener = new HierarchyListener(hierarchy);
            hierarchyListener.ItemAdded += hierarchyListener_ItemAdded;
            hierarchyListener.Complete += hierarchyListener_Completed;
            hierarchyListener.StartListening();
        }

Usage Example

Пример #1
0
        public override void Load(string fileName, string location, string name, uint flags, ref Guid iidProject, out int canceled)
        {
            // this needs to be instantiated before the base call, and then start watching
            // the hierarchy after. This is because the base.Load call hits the AddChild
            // method of the references, which add to the project sources. The watching
            // needs to start after the base call because if it's started before, then there
            // aren't any files added yet!
            projectSources = new BooProjectSources(languageService);

            base.Load(fileName, location, name, flags, ref iidProject, out canceled);

            projectSources.StartWatchingHierarchy(InteropSafeHierarchy);

            BooProjectSources.LoadedProjects.Add(projectSources);
        }