Beispiel #1
0
        private void InitializeWithDTEAndSolutionReady()
        {
            m_dte = (EnvDTE.DTE) this.GetService(typeof(EnvDTE.DTE));

            if (m_dte == null)
            {
                ErrorHandler.ThrowOnFailure(1);
            }

            var solutionBase = "";
            var solutionName = "";

            if (m_dte.Solution != null)
            {
                solutionBase = System.IO.Path.GetDirectoryName(m_dte.Solution.FullName);
                solutionName = System.IO.Path.GetFileNameWithoutExtension(m_dte.Solution.FullName);
            }
            //string dbName = string.Format("Ganji.History-{0}.sdf", solutionName);

            var basePath       = PreparePath();
            var repositoryPath = System.IO.Path.Combine(basePath, "LocalHistory");
            var solutionPath   = solutionBase;

            m_saveListener = new SaveListener();
            m_saveListener.Register(m_dte, repositoryPath, solutionPath);
        }
Beispiel #2
0
        public int OnBeforeCloseSolution(object pUnkReserved)
        {
            if (m_saveListener != null)
            {
                m_saveListener.Shutdown();
                m_saveListener = null;
            }

            return(VSConstants.S_OK);
        }