Browse Source

Ensure injected properties have public setters

tags/1.0-rc
james7132 8 years ago
parent
commit
73f00eb0d7
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/Discord.Net.Commands/Utilities/ReflectionUtils.cs

+ 1
- 1
src/Discord.Net.Commands/Utilities/ReflectionUtils.cs 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<DontInjectAttribute>() == null)
.Where(p => p.SetMethod?.IsPublic == true && p.GetCustomAttribute<DontInjectAttribute>() == null)
.ToArray();

return (map) =>


Loading…
Cancel
Save