コード例 #1
0
        public override int SetSite(Microsoft.VisualStudio.OLE.Interop.IServiceProvider site)
        {
            base.SetSite(site);

            //Initialize a new object to track project document changes so that we can update the MainFile Property accordingly
            this.projectDocListenerForMainFileUpdates = new ProjectDocumentsListenerForMainFileUpdates((ServiceProvider)this.Site, this);
            this.projectDocListenerForMainFileUpdates.Init();

            return(VSConstants.S_OK);
        }
コード例 #2
0
        public override int Close()
        {
            if (null != this.projectDocListenerForMainFileUpdates)
            {
                this.projectDocListenerForMainFileUpdates.Dispose();
                this.projectDocListenerForMainFileUpdates = null;
            }

            if (null != Site)
            {
                IPythonLibraryManager libraryManager = Site.GetService(typeof(IPythonLibraryManager)) as IPythonLibraryManager;
                if (null != libraryManager)
                {
                    libraryManager.UnregisterHierarchy(this.InteropSafeHierarchy);
                }
            }

            return(base.Close());
        }
コード例 #3
0
        public override int SetSite(Microsoft.VisualStudio.OLE.Interop.IServiceProvider site)
        {
            base.SetSite(site);

            //Initialize a new object to track project document changes so that we can update the MainFile Property accordingly
            this.projectDocListenerForMainFileUpdates = new ProjectDocumentsListenerForMainFileUpdates((ServiceProvider)this.Site, this);
            this.projectDocListenerForMainFileUpdates.Init();

            return VSConstants.S_OK;
        }
コード例 #4
0
        public override int Close()
        {
            if (null != this.projectDocListenerForMainFileUpdates)
            {
                this.projectDocListenerForMainFileUpdates.Dispose();
                this.projectDocListenerForMainFileUpdates = null;
            }

            if (null != Site)
            {
                IPythonLibraryManager libraryManager = Site.GetService(typeof(IPythonLibraryManager)) as IPythonLibraryManager;
                if (null != libraryManager)
                {
                    libraryManager.UnregisterHierarchy(this.InteropSafeHierarchy);
                }
            }

            return base.Close();
        }