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); }
private int _SaveUserOptions(IVsSolutionPersistence pPersistence) { return (StorageOptions.SaveBookmarksToOwnFile ? VSConstants.S_OK : pPersistence.SavePackageUserOpts(this, persistenceKey)); }
// 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); }
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 } }
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); }
// 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); }
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); }
/// <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; }
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; }
// 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"); }
/// <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; }