Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Bockover <abock@microsoft.com>2019-06-13 23:06:55 +0300
committerGitHub <noreply@github.com>2019-06-13 23:06:55 +0300
commit533e68ef6c4aba0672fb76309e2c3d0f4742aa0c (patch)
treecc299b038ad36f5d189ee623fd2c630557d2d596 /main/src/addins/MonoDevelop.Refactoring
parent56232b984df8cbb5b22bc233295410864262b774 (diff)
parenta4d7d0189f29722f0c411cc6270ae59647c740c6 (diff)
Merge pull request #7850 from mono/pr-anvod-extract-interface
Fixes VSTS 893547: Extract Interface Dialog buttons don't close dialog
Diffstat (limited to 'main/src/addins/MonoDevelop.Refactoring')
-rw-r--r--main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring.ExtractInterface/ExtractInterfaceOptionService.cs45
1 files changed, 23 insertions, 22 deletions
diff --git a/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring.ExtractInterface/ExtractInterfaceOptionService.cs b/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring.ExtractInterface/ExtractInterfaceOptionService.cs
index c12bf94ebe..0a6af9bb24 100644
--- a/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring.ExtractInterface/ExtractInterfaceOptionService.cs
+++ b/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring.ExtractInterface/ExtractInterfaceOptionService.cs
@@ -59,31 +59,32 @@ namespace MonoDevelop.Refactoring.ExtractInterface
{
await threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync ();
- var dialog = new ExtractInterfaceDialog ();
+ using (var dialog = new ExtractInterfaceDialog ()) {
- dialog.Init (
- syntaxFactsService,
- notificationService,
- extractableMembers,
- defaultInterfaceName,
- conflictingTypeNames,
- defaultNamespace,
- generatedNameTypeParameterSuffix,
- languageName);
+ dialog.Init (
+ syntaxFactsService,
+ notificationService,
+ extractableMembers,
+ defaultInterfaceName,
+ conflictingTypeNames,
+ defaultNamespace,
+ generatedNameTypeParameterSuffix,
+ languageName);
- bool performChange = dialog.Run () == Xwt.Command.Ok;
- if (!performChange)
- return ExtractInterfaceOptionsResult.Cancelled;
+ bool performChange = dialog.Run () == Xwt.Command.Ok;
+ if (!performChange)
+ return ExtractInterfaceOptionsResult.Cancelled;
- return new ExtractInterfaceOptionsResult (
- false,
- dialog.IncludedMembers.AsImmutable (),
- dialog.InterfaceName,
- dialog.FileName,
- dialog.UseSameFile
- ? ExtractInterfaceOptionsResult.ExtractLocation.SameFile
- : ExtractInterfaceOptionsResult.ExtractLocation.NewFile
- );
+ return new ExtractInterfaceOptionsResult (
+ false,
+ dialog.IncludedMembers.AsImmutable (),
+ dialog.InterfaceName,
+ dialog.FileName,
+ dialog.UseSameFile
+ ? ExtractInterfaceOptionsResult.ExtractLocation.SameFile
+ : ExtractInterfaceOptionsResult.ExtractLocation.NewFile
+ );
+ }
}
}
}