diff --git a/src/Discord.Net/ServiceManager.cs b/src/Discord.Net/ServiceManager.cs index f04c19d13..470ecd689 100644 --- a/src/Discord.Net/ServiceManager.cs +++ b/src/Discord.Net/ServiceManager.cs @@ -1,11 +1,11 @@ using System; +using System.Collections; using System.Collections.Generic; namespace Discord { public class ServiceManager { - public IEnumerable Services => _services.Values; private readonly Dictionary _services; internal DiscordClient Client { get; } @@ -37,5 +37,7 @@ namespace Discord throw new InvalidOperationException($"This operation requires {typeof(T).Name} to be added to {nameof(DiscordClient)}."); return singletonT; } + + public IEnumerator GetEnumerator() => _services.Values.GetEnumerator(); } }