Microsoft.Samples.VisualStudio.SourceControlIntegration.SccProvider.SccProvider.SaveSolutionProps C# (CSharp) Method

SaveSolutionProps() public method

public SaveSolutionProps ( [ pHierarchy, [ pPersistence ) : int
pHierarchy [
pPersistence [
return int
        public int SaveSolutionProps([InAttribute] IVsHierarchy pHierarchy, [InAttribute] IVsSolutionPersistence pPersistence)
        {
            // This function gets called by the shell after determining the package has dirty props.
            // The package will pass in the key under which it wants to save its properties,
            // and the IDE will call back on WriteSolutionProps

            // The properties will be saved in the Pre-Load section
            // When the solution will be reopened, the IDE will call our package to load them back before the projects in the solution are actually open
            // This could help if the source control package needs to persist information like projects translation tables, that should be read from the suo file
            // and should be available by the time projects are opened and the shell start calling IVsSccEnlistmentPathTranslation functions.
            pPersistence.SavePackageSolutionProps(1, null, this, _strSolutionPersistanceKey);

            // Once we saved our props, the solution is not dirty anymore
            SolutionHasDirtyProps = false;

            return VSConstants.S_OK;
        }