Browse Source

AddService should return the passed object

tags/docs-0.9
RogueException 9 years ago
parent
commit
aa0ed4cdc1
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      src/Discord.Net/DiscordClient.cs

+ 2
- 1
src/Discord.Net/DiscordClient.cs View File

@@ -273,11 +273,12 @@ namespace Discord
_currentUser = null;
}

public void AddService<T>(T obj)
public T AddService<T>(T obj)
where T : class, IService
{
_services.Add(typeof(T), obj);
obj.Install(this);
return obj;
}
public T GetService<T>()
where T : class, IService


Loading…
Cancel
Save