public SingletonEventsScheduleManager(IEventTypeCache cache, IDataPath folderData) { this.cache = cache ?? throw new ArgumentNullException(nameof(cache)); var folder = folderData?.FolderData ?? throw new ArgumentNullException(nameof(folderData)); path = Path.Combine(folder, "events.json"); }
public EntityFrameworkCoreEventStore(ISIOStoreDbContextFactory <TStoreDbContext> dbContextFactory, IEventContextFactory eventContextFactory, IEventModelFactory eventModelFactory, IEventTypeCache eventTypeCache, ILogger <EntityFrameworkCoreEventStore <TStoreDbContext> > logger) { if (dbContextFactory == null) { throw new ArgumentNullException(nameof(dbContextFactory)); } if (eventContextFactory == null) { throw new ArgumentNullException(nameof(eventContextFactory)); } if (eventModelFactory == null) { throw new ArgumentNullException(nameof(eventModelFactory)); } if (eventTypeCache == null) { throw new ArgumentNullException(nameof(eventTypeCache)); } if (logger == null) { throw new ArgumentNullException(nameof(logger)); } _dbContextFactory = dbContextFactory; _eventContextFactory = eventContextFactory; _eventModelFactory = eventModelFactory; _eventTypeCache = eventTypeCache; _logger = logger; }
public MtgaOutputLogResultsPreparer( CacheSingleton <Dictionary <int, Card> > cacheCards, IMapper mapper, IEventTypeCache eventsScheduleManager) { dictAllCards = cacheCards.Get(); this.mapper = mapper; this.eventsScheduleManager = eventsScheduleManager; Reset(); }
public MtgaOutputLogResultsPreparer2( //IOptionsMonitor<ConfigModelApp> configApp, CacheSingleton <Dictionary <int, Card> > cacheCards, IEventTypeCache eventsScheduleManager) { //this.configApp = configApp.CurrentValue; dictAllCards = cacheCards.Get(); this.eventsScheduleManager = eventsScheduleManager; Reset(); }
public void WhenConstructedWithNullEventTypeCacheShouldThrowArgumentNullException() { var dbContextFactory = new Mock <IDbContextFactory>().Object; var eventContextFactory = new Mock <IEventContextFactory>().Object; var eventModelFactory = new Mock <IEventModelFactory>().Object; IEventTypeCache eventTypeCache = null; var logger = new Mock <ILogger <EntityFrameworkCoreEventStore> >().Object; Action act = () => new EntityFrameworkCoreEventStore(dbContextFactory: dbContextFactory, eventContextFactory: eventContextFactory, eventModelFactory: eventModelFactory, eventTypeCache: eventTypeCache, logger: logger); act.Should().Throw <ArgumentNullException>(). And.ParamName.Should().Be("eventTypeCache"); }
public DefaultEventContextFactory(IEventTypeCache eventTypeCache, IEventDeserializer eventDeserializer) { if (eventTypeCache == null) { throw new ArgumentNullException(nameof(eventTypeCache)); } if (eventDeserializer == null) { throw new ArgumentNullException(nameof(eventDeserializer)); } _eventTypeCache = eventTypeCache; _eventDeserializer = eventDeserializer; _cache = new ConcurrentDictionary <Type, Activator <IEventContext <IEvent> > >(); }
public SIOEventStore(IDbContextFactory dbContextFactory, IEventDeserializer eventDeserializer, IEventTypeCache eventTypeCache) { if (dbContextFactory == null) { throw new ArgumentNullException(nameof(dbContextFactory)); } if (eventDeserializer == null) { throw new ArgumentNullException(nameof(eventDeserializer)); } ; if (eventTypeCache == null) { throw new ArgumentNullException(nameof(eventTypeCache)); } _dbContextFactory = dbContextFactory; _eventDeserializer = eventDeserializer; _eventTypeCache = eventTypeCache; }
public AutoMapperEventNameToTypeConverter(IEventTypeCache eventsScheduleManager) { this.eventsScheduleManager = eventsScheduleManager; }