Quantcast
Channel: ClearScript
Viewing all articles
Browse latest Browse all 2297

Commented Issue: MetaScriptItem doesnt override GetDynamicMemberNames [64]

$
0
0
the base implantation of DynamicMetaObject just returns an empty string array.

advise using doing something like what dynamic object does


```
public override IEnumerable<string> GetDynamicMemberNames()
{
return scriptItem.GetDynamicMemberNames();
}
```


test
```
var objWithcolor = engine.Evaluate("x={color:'red'};");
var dynamicProvider = (IDynamicMetaObjectProvider)objWithcolor;
var metaObject = dynamicProvider.GetMetaObject(Expression.Constant(dynamicProvider));
var propNames = metaObject.GetDynamicMemberNames();
Assert.IsTrue(propNames.Any(name => name == "color"));
```
Comments: Fixed in [Version 5.4.1](https://clearscript.codeplex.com/SourceControl/changeset/c2200cbd6b77300484927906517035caef3ae323).

Viewing all articles
Browse latest Browse all 2297

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>