Ensure injected properties have public setters
This commit is contained in:
@@ -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<DontInjectAttribute>() == null)
|
||||
.Where(p => p.SetMethod?.IsPublic == true && p.GetCustomAttribute<DontInjectAttribute>() == null)
|
||||
.ToArray();
|
||||
|
||||
return (map) =>
|
||||
|
||||
Reference in New Issue
Block a user