コード例 #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);
            }
        }
コード例 #2
0
ファイル: VbProjectExtensions.cs プロジェクト: sanny32/VBAGit
 /// <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()));
 }