Exemple #1
0
 public CachingMementoRepository(IMementoRepository innerRepository, ICache cache)
     : base(innerRepository)
 {
     m_cache  = cache;
     Prefix   = "Memento:";
     Lifetime = DefaultLifetime;
 }
Exemple #2
0
        public SqlEventStorage(IEventStorageRepository eventStoreRepository, IMementoRepository mementoRepository)
        {
            this.eventStoreRepository = eventStoreRepository;
            this.mementoRepository    = mementoRepository;

            _eventsDict = new ConcurrentDictionary <string, ConcurrentBag <Event> >();
        }
Exemple #3
0
        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;
 }
Exemple #5
0
 public InMemoryEventStorage(IMementoRepository mementoRepository)
 {
     this.mementoRepository = mementoRepository;
     events = new List <Event>();
 }
Exemple #6
0
 public MementoService(IMementoRepository repository)
 {
     m_repository = repository;
     Enabled      = true;
 }
Exemple #7
0
 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);
 }