diff --git a/src/Discord.Net.Commands/Attributes/InjectAttribute.cs b/src/Discord.Net.Commands/Attributes/DontInjectAttribute.cs similarity index 66% rename from src/Discord.Net.Commands/Attributes/InjectAttribute.cs rename to src/Discord.Net.Commands/Attributes/DontInjectAttribute.cs index b970fa8c8..bd966e129 100644 --- a/src/Discord.Net.Commands/Attributes/InjectAttribute.cs +++ b/src/Discord.Net.Commands/Attributes/DontInjectAttribute.cs @@ -3,7 +3,7 @@ using System; namespace Discord.Commands { [AttributeUsage(AttributeTargets.Property)] - public class InjectAttribute : Attribute { + public class DontInjectAttribute : Attribute { } } diff --git a/src/Discord.Net.Commands/Utilities/ReflectionUtils.cs b/src/Discord.Net.Commands/Utilities/ReflectionUtils.cs index 5bed627df..14192e0bd 100644 --- a/src/Discord.Net.Commands/Utilities/ReflectionUtils.cs +++ b/src/Discord.Net.Commands/Utilities/ReflectionUtils.cs @@ -20,7 +20,7 @@ namespace Discord.Commands var constructor = constructors[0]; System.Reflection.ParameterInfo[] parameters = constructor.GetParameters(); System.Reflection.PropertyInfo[] properties = typeInfo.DeclaredProperties - .Where(p => p.CanWrite && p.GetCustomAttribute() != null) + .Where(p => p.CanWrite && p.GetCustomAttribute() == null) .ToArray(); return (map) =>