private void RegisterProjectWithGit(IVsSccProject2 pscp2Project)
{
if (pscp2Project == null)
{
// Manual registration with source control of the solution, from OnAfterOpenSolution
Debug.WriteLine(string.Format(CultureInfo.CurrentUICulture, "Solution {0} is registering with source control - {1}", GetSolutionFileName()));
//IVsHierarchy solHier = (IVsHierarchy)_sccProvider.GetService(typeof(SVsSolution));
//string solutionFile = GetSolutionFileName();
}
else
{
// Debug.WriteLine(string.Format(CultureInfo.CurrentUICulture, "Project {0} is registering with source control - {1}", GetProjectFileName(pscp2Project)));
// Add the project to the list of controlled projects
ThreadHelper.JoinableTaskFactory.Run(async delegate
{
await _fileCache.AddProject(pscp2Project);
});
}
}