private static object GetPropertyValue(object item, string property)
{
object result;
var dictionary = item as IDictionary;
if (dictionary != null)
{
result = dictionary[property];
}
else
{
result = ObjectAccessor.Create(item)[property];
}
return result;
}