diff --git a/src/Discord.Net.Commands/Attributes/InjectAttribute.cs b/src/Discord.Net.Commands/Attributes/InjectAttribute.cs
index 836a4c668..09c0b553b 100644
--- a/src/Discord.Net.Commands/Attributes/InjectAttribute.cs
+++ b/src/Discord.Net.Commands/Attributes/InjectAttribute.cs
@@ -2,6 +2,12 @@
namespace Discord.Commands
{
+ ///
+ /// Indicates that this property should be filled in by dependency injection.
+ ///
+ ///
+ /// This property **MUST** have a setter.
+ ///
[AttributeUsage(AttributeTargets.Property)]
public sealed class InjectAttribute : Attribute
{
diff --git a/src/Discord.Net.Commands/Dependencies/DependencyMap.cs b/src/Discord.Net.Commands/Dependencies/DependencyMap.cs
index 7f489fda0..0761f5fff 100644
--- a/src/Discord.Net.Commands/Dependencies/DependencyMap.cs
+++ b/src/Discord.Net.Commands/Dependencies/DependencyMap.cs
@@ -14,14 +14,18 @@ namespace Discord.Commands
map = new Dictionary>();
}
+ ///
public void Add(T obj) where T : class
=> AddFactory(() => obj);
+ ///
public void AddTransient() where T : class, new()
=> AddFactory(() => new T());
+ ///
public void AddTransient() where TKey : class
where TImpl : class, TKey, new()
=> AddFactory(() => new TImpl());
-
+
+ ///
public void AddFactory(Func factory) where T : class
{
var t = typeof(T);
@@ -30,10 +34,12 @@ namespace Discord.Commands
map.Add(t, factory);
}
+ ///
public T Get()
{
return (T)Get(typeof(T));
}
+ ///
public object Get(Type t)
{
object result;
@@ -43,6 +49,7 @@ namespace Discord.Commands
return result;
}
+ ///
public bool TryGet(out T result)
{
object untypedResult;
@@ -57,6 +64,7 @@ namespace Discord.Commands
return false;
}
}
+ ///
public bool TryGet(Type t, out object result)
{
Func