public int OnClose(ref uint pgrfSaveOptions) { NuGetUIThreadHelper.JoinableTaskFactory.Run(async() => { await _content.SaveSettingsAsync(CancellationToken.None); }); _content.Model.Context.UserSettingsManager.PersistSettings(); pgrfSaveOptions = (uint)__FRAMECLOSE.FRAMECLOSE_NoSave; return(VSConstants.S_OK); }
public int OnClose(ref uint pgrfSaveOptions) { PackageManagerControl content = _content; if (content != null) { NuGetUIThreadHelper.JoinableTaskFactory.Run(async() => { await content.SaveSettingsAsync(CancellationToken.None); }); content.Model.Context.UserSettingsManager.PersistSettings(); } Closed?.Invoke(this, EventArgs.Empty); pgrfSaveOptions = (uint)__FRAMECLOSE.FRAMECLOSE_NoSave; Dispose(); return(VSConstants.S_OK); }