Ejemplo n.º 1
0
 public int SaveUserOptions(IVsSolutionPersistence pPersistence)
 {
     ThreadHelper.ThrowIfNotOnUIThread();
     pPersistence.SavePackageUserOpts(this, SELECTED_WEB_RESOURCES);
     pPersistence.SavePackageUserOpts(this, SELECTED_REPORTS);
     return(VSConstants.S_OK);
 }
        public int SaveUserOptions([In] IVsSolutionPersistence pPersistence)
        {
            try
            {
                IAnkhSccService scc = GetService <IAnkhSccService>();
                if (scc != null)
                {
                    if (!scc.IsActive)
                    {
                        return(VSErr.S_OK);
                    }

                    pPersistence.SavePackageUserOpts(this, SccPendingChangeStream);
                    pPersistence.SavePackageUserOpts(this, SccExcludedStream);

                    if (scc.IsSolutionManaged)
                    {
                        pPersistence.SavePackageUserOpts(this, SccTranslateStream);
                    }
                }

                return(VSErr.S_OK);
            }
            finally
            {
                if (Marshal.IsComObject(pPersistence))
                {
                    Marshal.ReleaseComObject(pPersistence); // See Package.cs from MPF for reason
                }
            }
        }
 /// <summary>
 /// Called by the shell when the SUO file is saved. The provider calls the shell back to let it
 /// know which options keys it will use in the suo file.
 /// </summary>
 public int SaveUserOptions(IVsSolutionPersistence pPersistence)
 {
     // The shell will create a stream for the section of interest, and will call back the provider on
     // IVsPersistSolutionProps.WriteUserOptions() to save specific options under the specified key.
     pPersistence.SavePackageUserOpts(this, _strSolutionUserOptionsKey);
     return(VSConstants.S_OK);
 }
Ejemplo n.º 4
0
 private int _SaveUserOptions(IVsSolutionPersistence pPersistence)
 {
     return
         (StorageOptions.SaveBookmarksToOwnFile ?
          VSConstants.S_OK :
          pPersistence.SavePackageUserOpts(this, persistenceKey));
 }
Ejemplo n.º 5
0
        // Called by the shell when the SUO file is saved. The provider calls the shell back to let it
        // know which options keys it will use in the suo file.
        public int SaveUserOptions(IVsSolutionPersistence pPersistence)
        {
            ThreadHelper.ThrowIfNotOnUIThread();

            pPersistence.SavePackageUserOpts(this, NuGetOptionsStreamKey);
            return(VSConstants.S_OK);
        }
Ejemplo n.º 6
0
        public int SaveUserOptions(IVsSolutionPersistence pPersistence)
        {
            try
            {
                pPersistence.SavePackageUserOpts(this, CqrsNetSettingsKey);

                return(VSConstants.S_OK);
            }
            finally
            {
                Marshal.ReleaseComObject(pPersistence);                 // See Package.cs from MPF for reason
            }
        }
Ejemplo n.º 7
0
 public void SaveSolutionSettings(PersistedSolutionSettings solutionSettings)
 {
     Microsoft.VisualStudio.Shell.ThreadHelper.ThrowIfNotOnUIThread();
     try
     {
         _solutionSettingsToSave = solutionSettings;
         _vsSolutionPersistence.SavePackageUserOpts(this, SolutionSettingsString);
     }
     finally
     {
         _solutionSettingsToSave = null;
     }
 }
 public int SaveUserOptions(IVsSolutionPersistence pPersistence)
 {
     try {
         foreach (StoreType type in Enum.GetValues(typeof(StoreType)))
         {
             pPersistence.SavePackageUserOpts(this, getKey(type));
         }
     }
     finally {
         Marshal.ReleaseComObject(pPersistence);
     }
     return(VSConstants.S_OK);
 }
Ejemplo n.º 9
0
        // IVsPersistSolutionProps::SaveUserOptions
        public int SaveUserOptions([In] IVsSolutionPersistence pPersistence)
        {
            // This function gets called by the shell when the SUO file is saved.
            // The provider calls the shell back to let it know which options keys it will use in the suo file.
            // The shell will create a stream for the section of interest, and will call back the provider on
            // IVsPersistSolutionProps.WriteUserOptions() to save specific options under the specified key.
            int pfResult = 0;

            SccService.AnyItemsUnderSourceControl(out pfResult);
            if (pfResult > 0)
            {
                pPersistence.SavePackageUserOpts(this, _strSolutionUserOptionsKey);
            }
            return(VSConstants.S_OK);
        }
Ejemplo n.º 10
0
 public int SaveUserOptions(IVsSolutionPersistence pPersistence)
 {
     pPersistence.SavePackageUserOpts(this, SELECTED_WEB_RESOURCES);
     pPersistence.SavePackageUserOpts(this, SELECTED_REPORTS);
     return(VSConstants.S_OK);
 }
 int IVsPersistSolutionOpts.SaveUserOptions(IVsSolutionPersistence pPersistence)
 {
     pPersistence.SavePackageUserOpts(this, "nuget");
     return(VSConstants.S_OK);
 }
Ejemplo n.º 12
0
        /// <include file='doc\Package.uex' path='docs/doc[@for="Package.IVsPersistSolutionOpts.SaveUserOptions"]/*' />
        /// <internalonly/>
        /// <devdoc>
        /// IVsPersistSolutionOpts implementation.
        /// Called by the shell when we are to persist our service options
        /// </devdoc>
        int IVsPersistSolutionOpts.SaveUserOptions(IVsSolutionPersistence pPersistance) {

            if (_optionKeys != null) {
                foreach(string key in _optionKeys) {
                    NativeMethods.ThrowOnFailure( pPersistance.SavePackageUserOpts(this, key) );
                }
            }

            // Shell relies on this being released when we're done with it.  If you see strange
            // faults in the shell when saving the solution, suspect this!
            //
            Marshal.ReleaseComObject(pPersistance);

            return NativeMethods.S_OK;
        }
Ejemplo n.º 13
0
 public int SaveUserOptions(IVsSolutionPersistence pPersistence)
 {
     pPersistence.SavePackageUserOpts(this, _strSolutionPersistanceKey + _strUsername);
     pPersistence.SavePackageUserOpts(this, _strSolutionPersistanceKey + _strPassword);
     return(VSConstants.S_OK);
 }
 public int SaveUserOptions(IVsSolutionPersistence pPersistence)
 {
     pPersistence.SavePackageUserOpts(this, "nuget");
     return VSConstants.S_OK;
 }
Ejemplo n.º 15
0
 // Called by the shell when the SUO file is saved. The provider calls the shell back to let it
 // know which options keys it will use in the suo file.
 public int SaveUserOptions(IVsSolutionPersistence pPersistence)
 {
     pPersistence.SavePackageUserOpts(this, NuGetOptionsStreamKey);
     return(VSConstants.S_OK);
 }
 public void SaveNuGetSettings()
 {
     IVsSolutionPersistence solutionPersistence = GetGlobalService(typeof(SVsSolutionPersistence)) as IVsSolutionPersistence;
     solutionPersistence.SavePackageUserOpts(this, "nuget");
 }
Ejemplo n.º 17
0
        /// <include file='doc\Package.uex' path='docs/doc[@for="Package.IVsPersistSolutionOpts.SaveUserOptions"]/*' />
        /// <internalonly/>
        /// <devdoc>
        /// IVsPersistSolutionOpts implementation.
        /// Called by the shell when we are to persist our service options
        /// </devdoc>
        int IVsPersistSolutionOpts.SaveUserOptions(IVsSolutionPersistence pPersistance)
        {
            if (_optionKeys != null) {
                foreach(string key in _optionKeys) {
                    NativeMethods.ThrowOnFailure( pPersistance.SavePackageUserOpts(this, key) );
                }
            }

            return NativeMethods.S_OK;
        }