AddService should return the passed object

This commit is contained in:
RogueException
2015-11-06 00:27:57 -04:00
parent 48ad4a53ba
commit aa0ed4cdc1

View File

@@ -273,11 +273,12 @@ namespace Discord
_currentUser = null; _currentUser = null;
} }
public void AddService<T>(T obj) public T AddService<T>(T obj)
where T : class, IService where T : class, IService
{ {
_services.Add(typeof(T), obj); _services.Add(typeof(T), obj);
obj.Install(this); obj.Install(this);
return obj;
} }
public T GetService<T>() public T GetService<T>()
where T : class, IService where T : class, IService