Commit 83171792 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 461cad0d
...@@ -831,6 +831,11 @@ public override bool TryGetMember(System.Dynamic.GetMemberBinder binder, out obj ...@@ -831,6 +831,11 @@ public override bool TryGetMember(System.Dynamic.GetMemberBinder binder, out obj
return data.TryGetValue(binder.Name, out result); return data.TryGetValue(binder.Name, out result);
} }
public override IEnumerable<string> GetDynamicMemberNames()
{
return data.Keys;
}
#region IDictionary<string,object> Members #region IDictionary<string,object> Members
void IDictionary<string, object>.Add(string key, object value) void IDictionary<string, object>.Add(string key, object value)
...@@ -871,7 +876,11 @@ public override bool TryGetMember(System.Dynamic.GetMemberBinder binder, out obj ...@@ -871,7 +876,11 @@ public override bool TryGetMember(System.Dynamic.GetMemberBinder binder, out obj
} }
set set
{ {
throw new NotImplementedException(); if (!data.ContainsKey(key))
{
throw new NotImplementedException();
}
data[key] = value;
} }
} }
......
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