public CachingMementoRepository(IMementoRepository innerRepository, ICache cache) : base(innerRepository) { m_cache = cache; Prefix = "Memento:"; Lifetime = DefaultLifetime; }
public SqlEventStorage(IEventStorageRepository eventStoreRepository, IMementoRepository mementoRepository) { this.eventStoreRepository = eventStoreRepository; this.mementoRepository = mementoRepository; _eventsDict = new ConcurrentDictionary <string, ConcurrentBag <Event> >(); }
public DefalutEventStorage(IEventStorageRepository eventStoreRepository, IMementoRepository mementoRepository) { this.EventStorageRepository = eventStoreRepository; this.MementoRepository = mementoRepository; _eventsDict = new ConcurrentCache <string, ConcurrentBag <Event> >(); }
public RedisEventStorage(ICacheService cacheService, IEventStorageRepository eventStorageRepository, IMementoRepository mementoRepository) { this.cacheService = cacheService; this.MementoRepository = mementoRepository; this.EventStorageRepository = eventStorageRepository; }
public InMemoryEventStorage(IMementoRepository mementoRepository) { this.mementoRepository = mementoRepository; events = new List <Event>(); }
public MementoService(IMementoRepository repository) { m_repository = repository; Enabled = true; }
public CareTaker(Asset asset, IMementoRepository mementoRepository) { _asset = asset; _mementoRepository = mementoRepository; }
protected DecoratedMementoRepository(IMementoRepository innerRepository) { m_innerRepository = innerRepository; }
public CachingMementoRepositoryTest() { m_mockInner = new Mock <IMementoRepository>(MockBehavior.Strict); m_mockCache = new Mock <ICache>(MockBehavior.Strict); m_repository = new CachingMementoRepository(m_mockInner.Object, m_mockCache.Object); }