Commit e2c3c077 authored by Sam Saffron's avatar 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.
parent 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% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment