Browse Source

Actually implemented the IEnumerable interface

tags/docs-0.9
Justas Dabrila 9 years ago
parent
commit
dfd105ab2d
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      src/Discord.Net/ServiceManager.cs

+ 3
- 1
src/Discord.Net/ServiceManager.cs View File

@@ -4,7 +4,7 @@ using System.Collections.Generic;

namespace Discord
{
public class ServiceManager
public class ServiceManager : IEnumerable<IService>
{
private readonly Dictionary<Type, IService> _services;

@@ -38,6 +38,8 @@ namespace Discord
return singletonT;
}

IEnumerator<IService> IEnumerable<IService>.GetEnumerator() => _services.Values.GetEnumerator();

public IEnumerator GetEnumerator() => _services.Values.GetEnumerator();
}
}

Loading…
Cancel
Save