public static ListCacheEntidad <T> ObtenerCache(string nombre, CondicionBase cond, List <T> lista) { // Si no se especifca nombre se toma el de la clase T. if (String.IsNullOrEmpty(nombre)) { nombre = typeof(T).Name; } ListCacheEntidad <T> r = CacheEntidades <T> .GetCache(nombre); if (r == null) { ListCacheEntidad <T> l = new ListCacheEntidad <T>(nombre, cond, lista); l.Cargar(); CacheEntidades <T> .AddCache(l); r = l; } return(r); }
public ListCacheEntidad(String nombre, CondicionBase condicion, List <T> lista) { this.TipoEntidad = typeof(T); if (!String.IsNullOrEmpty(nombre)) { this.Nombre = nombre; } else { this.Nombre = this.TipoEntidad.Name; } if (lista == null) { this.TipoServicio = FuncionesVarias.ObtenerTipoServicio(this.TipoEntidad.Name + "Servicio"); } this.Condicion = condicion; this.Lista = lista; }
public static ListCacheEntidad <T> ObtenerCache(CondicionBase cond) { return(ObtenerCache(null, cond, null)); }
public static ListCacheEntidad <T> ObtenerCache(string nombre, CondicionBase cond) { return(ObtenerCache(nombre, cond, null)); }