Change whitelist injection into blacklist injection

This commit is contained in:
james7132
2017-02-10 22:02:18 +00:00
parent f0b4c24e82
commit f1df412341
2 changed files with 2 additions and 2 deletions

View File

@@ -3,7 +3,7 @@ using System;
namespace Discord.Commands {
[AttributeUsage(AttributeTargets.Property)]
public class InjectAttribute : Attribute {
public class DontInjectAttribute : Attribute {
}
}

View File

@@ -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<InjectAttribute>() != null)
.Where(p => p.CanWrite && p.GetCustomAttribute<DontInjectAttribute>() == null)
.ToArray();
return (map) =>