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:
authorMarius Ungureanu <marius.ungureanu@xamarin.com>2015-06-16 23:03:59 +0300
committerMarius Ungureanu <marius.ungureanu@xamarin.com>2015-06-16 23:03:59 +0300
commit4647a7f17602eab2c5917cfec652aa82401ce5c6 (patch)
tree0afff9335dc26633ad42d02c5eb2d330728cb661 /main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands
parent1b0f862d35745b087b342a73d220f3691cfb8a73 (diff)
[Ide] Improve CommandInfo enumerating.
Use generics for the underlying type, this will make the experience smoother.
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands')
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandArrayInfo.cs11
1 files changed, 8 insertions, 3 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandArrayInfo.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandArrayInfo.cs
index 0504f41ba3..46bb5edd32 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandArrayInfo.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandArrayInfo.cs
@@ -33,7 +33,7 @@ using System.Linq;
namespace MonoDevelop.Components.Commands
{
- public class CommandArrayInfo: IEnumerable
+ public class CommandArrayInfo: IEnumerable<CommandInfo>
{
List<CommandInfo> list = new List<CommandInfo> ();
CommandInfo defaultInfo;
@@ -128,11 +128,16 @@ namespace MonoDevelop.Components.Commands
public CommandInfo DefaultCommandInfo {
get { return defaultInfo; }
}
-
- public IEnumerator GetEnumerator ()
+
+ public IEnumerator<CommandInfo> GetEnumerator ()
{
return list.GetEnumerator ();
}
+
+ IEnumerator IEnumerable.GetEnumerator ()
+ {
+ return GetEnumerator ();
+ }
// When set in an update handler, the command manager will ignore this handler method
// and will keep looking in the command route.