Fix error when member is not found with string key during PDT interpretation.
This commit is contained in:
@@ -266,7 +266,7 @@ namespace Cryville.Common.Pdt {
|
||||
else {
|
||||
MemberInfo prop = null;
|
||||
bool flag = false;
|
||||
if (pkey is string) prop = ReflectionHelper.GetMember(type, (string)pkey);
|
||||
if (pkey is string) prop = ReflectionHelper.TryGetMember(type, (string)pkey);
|
||||
if (prop == null) flag = ReflectionHelper.TryFindMemberWithAttribute<T>(type, out prop);
|
||||
if (prop == null) throw new MissingMemberException(string.Format("The property \"{0}\" is not found", pkey));
|
||||
Type ptype = ReflectionHelper.GetMemberType(prop);
|
||||
|
Reference in New Issue
Block a user