public CoreStrategy(object instance, Guid cacheId, bool cachingEnabled = true) { this.SignalInstance = instance; this.Strategy = instance as IStrategy; this.cacheId = cacheId; this.cachingEnabled = cachingEnabled; if (cachingEnabled) { this.Cache = new StrategyCache(instance, cacheId); this.Cache.Initialize(); } }
public static IDisposable BlockStrategy(IManga manga) { return(StrategyCache.Lock(manga)); }
public void Teardown() { TypeBuilder.Teardown(); StrategyCache.Teardown(); }