コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }