Esempio n. 1
0
        /// <summary>
        /// Returns folder contains repository path for project
        /// </summary>
        /// <param name="project">VBProject</param>
        /// <returns></returns>
        public static string GetVBProjectRepoPath(VBProject project)
        {
            var fileName = project.GetFileName();

            if (File.Exists(fileName))
            {
                var pathVBAGit = Path.Combine(Path.GetDirectoryName(fileName), VBAGitUI.VBAGitFolder);
                return(Path.Combine(pathVBAGit, project.GetRepoName()));
            }
            else
            {
                return(null);
            }
        }
Esempio n. 2
0
 /// <summary>
 /// Returns then name for the repository
 /// </summary>
 /// <param name="project"></param>
 /// <returns></returns>
 public static string GetRepoName(this VBProject project)
 {
     return(Path.GetFileNameWithoutExtension(project.GetFileName()));
 }