diff --git a/src/Discord.Net/ServiceManager.cs b/src/Discord.Net/ServiceManager.cs index 0e6533b90..e874b87e4 100644 --- a/src/Discord.Net/ServiceManager.cs +++ b/src/Discord.Net/ServiceManager.cs @@ -1,9 +1,10 @@ using System; +using System.Collections; using System.Collections.Generic; namespace Discord { - public class ServiceManager + public class ServiceManager : IEnumerable { private readonly Dictionary _services; @@ -36,5 +37,9 @@ namespace Discord throw new InvalidOperationException($"This operation requires {typeof(T).Name} to be added to {nameof(DiscordClient)}."); return singletonT; } + + IEnumerator IEnumerable.GetEnumerator() => _services.Values.GetEnumerator(); + + public IEnumerator GetEnumerator() => _services.Values.GetEnumerator(); } }