GitScc.SccProviderService.OnAfterOpenProject C# (CSharp) Method

OnAfterOpenProject() public method

public OnAfterOpenProject ( [ pHierarchy, [ fAdded ) : int
pHierarchy [
fAdded [
return int
        public int OnAfterOpenProject([In] IVsHierarchy pHierarchy, [In] int fAdded)
        {
            ThreadHelper.ThrowIfNotOnUIThread();

            bool isSolutionFolder = ThreadHelper.JoinableTaskFactory.Run(async delegate
            {
                return await pHierarchy.IsSolutionFolderProject();
            });
            //_fileCache.AddProject(pHierarchy);
            // If a solution folder is added to the solution after the solution is added to scc, we need to controll that folder
            if (isSolutionFolder && (fAdded == 1))
            {
                IVsHierarchy solHier = (IVsHierarchy)_sccProvider.GetService(typeof(SVsSolution));
                //if (IsProjectControlled(solHier))
                //{
                    // Register this solution folder using the same location as the solution
                IVsSccProject2 pSccProject = (IVsSccProject2)pHierarchy;
                RegisterProjectWithGit(pSccProject);
                    //RegisterSccProject(pSccProject, _solutionLocation, "", "", _sccProvider.ProviderName);

                // We'll also need to refresh the solution folders glyphs to reflect the controlled state
                IList<VSITEMSELECTION> nodes = new List<VSITEMSELECTION>();

                    VSITEMSELECTION vsItem;
                    vsItem.itemid = VSConstants.VSITEMID_ROOT;
                    vsItem.pHier = pHierarchy;
                    nodes.Add(vsItem);

                ThreadHelper.JoinableTaskFactory.Run(async delegate
                {
                    await RefreshNodesGlyphs(nodes);
                });
                
                //}
            }

            return VSConstants.S_OK;
        }
SccProviderService