public static ISerializer GetCurrent(SerializationFormat format) { var serializers = CacheContainer.GetAll <ISerializer>(); return((from s in serializers where s.Format == format select s).FirstOrDefault()); }
public override void AmOnChildEvent(IAmEventMessage message) { foreach (var cache in CacheContainer.GetAll()) { cache.OnMasterEvent(message); } layoutIsDirty = true; }
public static ICache Get(CacheType cacheType) { ICache cache = new NullCache(); try { var caches = CacheContainer.GetAll <ICache>(); cache = caches.Where(c => c.CacheType == cacheType).Last(); } catch (Exception ex) { //Log.Warn("Failed to instantiate cache of type: {0}, using null cache. Exception: {1}", cacheType, ex); cache = new NullCache(); } return(cache); }