public static Collection <ICollection <KeyValuePair <string, object> > > Get(MapperDb db, DbCommand command) { if (!db.CacheResults) { return(null); } string key = GetCacheKey(db, command); var item = MapperCache.GetCache <Collection <ICollection <KeyValuePair <string, object> > > >(key); return(item); }
public static List <PropertyInfo> GetProperties(Type item) { string key = item.FullName; var properties = MapperCache.GetCache <List <PropertyInfo> >(key); if (properties != null) { return(properties); } properties = item.GetProperties().Where(x => x.CanWrite).ToList(); MapperCache.AddToCache(key, properties); return(properties); }