diff options
author | Marius Ungureanu <marius.ungureanu@xamarin.com> | 2015-06-16 23:03:59 +0300 |
---|---|---|
committer | Marius Ungureanu <marius.ungureanu@xamarin.com> | 2015-06-16 23:03:59 +0300 |
commit | 4647a7f17602eab2c5917cfec652aa82401ce5c6 (patch) | |
tree | 0afff9335dc26633ad42d02c5eb2d330728cb661 /main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands | |
parent | 1b0f862d35745b087b342a73d220f3691cfb8a73 (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.cs | 11 |
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. |