提交 e2c3c077 编写于 作者: S Sam Saffron

patch by matt...@amigarulez.se, Some grids active/Telerik and other edge...

patch by  matt...@amigarulez.se, Some grids active/Telerik and other edge cases use reflection and other methods to cache members.

Current implementation results in inconsistent between the wrapper object and the underlying dictionary because the DynamicObject members are returned and not the underlying dictionary.

Simple fix basically add an override to FastExpando class and reflection acts consistently.
上级 abc8f982
......@@ -831,6 +831,11 @@ public override bool TryGetMember(System.Dynamic.GetMemberBinder binder, out obj
return data.TryGetValue(binder.Name, out result);
}
public override IEnumerable<string> GetDynamicMemberNames()
{
return data.Keys;
}
#region IDictionary<string,object> Members
void IDictionary<string, object>.Add(string key, object value)
......@@ -870,9 +875,13 @@ public override bool TryGetMember(System.Dynamic.GetMemberBinder binder, out obj
return data[key];
}
set
{
if (!data.ContainsKey(key))
{
throw new NotImplementedException();
}
data[key] = value;
}
}
#endregion
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册