public static IDictionary <string, object> ToDictionary(this ITypeCache typeCache, object value) { var mpn = typeCache.GetMappedPropertiesWithNames(value.GetType()); return(mpn.Select(x => new KeyValuePair <string, object>(x.Item2, x.Item1.GetValueEx(value))) .ToIDictionary()); }