Services.Add now returns the object passed to it

This commit is contained in:
RogueException
2015-12-23 03:33:02 -04:00
parent dcbf1f2299
commit f832eadba8

View File

@@ -15,11 +15,12 @@ namespace Discord
_services = new Dictionary<Type, IService>();
}
public void Add<T>(T service)
public T Add<T>(T service)
where T : class, IService
{
_services.Add(typeof(T), service);
service.Install(Client);
return service;
}
public T Get<T>(bool isRequired = true)