brucezhang80 / dapper-dot-net

Automatically exported from code.google.com/p/dapper-dot-net
Other
0 stars 0 forks source link

FastExpando enhancement suggestion #23

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'd like to be able to (dynamically) iterate over the internal IDictionary of a 
FastExpando object.
Implementing a TryConvert method could provide this functionality:

public override bool TryConvert(ConvertBinder binder, out object result)
{
    if (binder.Type == data.GetType())
    {
        result = data;
        return true;
    }
    return base.TryConvert(binder, out result);
} 

Original issue reported on code.google.com by gimel...@gmail.com on 16 May 2011 at 5:05

GoogleCodeExporter commented 9 years ago
can you add a failing test to a clone and/or a fix to a clone, would be happy 
to merge it in

Original comment by sam.saff...@gmail.com on 18 May 2011 at 1:48

GoogleCodeExporter commented 9 years ago
k FastExpando now implement IDictionary<string,object> 

Original comment by sam.saff...@gmail.com on 19 May 2011 at 3:12

GoogleCodeExporter commented 9 years ago

Original comment by sam.saff...@gmail.com on 19 May 2011 at 3:13

GoogleCodeExporter commented 9 years ago
Thanks, works for me.

The suggestion should have been more specific ( Query() result items are 
FastExpando objects...), thank you for scratching an itch.

Original comment by gimel...@gmail.com on 19 May 2011 at 5:13