public EventManager(IDomainEventDispatcher eventDispatcher, BaseDbContext dbContext, ILoggerFactory logger) { this.eventDispatcher = eventDispatcher; this.dbContext = dbContext; Query = dbContext.Set <EventEnvelope>(); this.logger = logger.CreateLogger(nameof(EventManager)); }
public ProductsContext( DbContextOptions <ProductsContext> options, IDomainEventDispatcher dispatcher) : base(options) { _dispatcher = dispatcher; }
public DomainEventsDispatcher( IDomainEventsAccessor domainEventsAccessor, IDomainEventDispatcher domainEventDispatcher) { _domainEventsAccessor = domainEventsAccessor; _domainEventDispatcher = domainEventDispatcher; }
private static Task DispatchAsync <TDomainEvent>( IDomainEventDispatcher dispatcher, TDomainEvent domainEvent) where TDomainEvent : IDomainEvent { return(dispatcher.DispatchEventAsync(domainEvent)); }
public BookContext(DbContextOptions options, DatabaseOption databaseOption, ILoggerFactory loggerFactory, IDomainEventDispatcher domainEventDispatcher) : base(options) { _databaseOption = databaseOption; _loggerFactory = loggerFactory; _domainEventDispatcher = domainEventDispatcher; }
/// <summary> /// Dispatches each <see cref="IDomainEvent"/> that was added to any <see cref="IAggregateRoot"/> before <see cref="CommitAsync"/> was called. /// </summary> /// <param name="dispatcher">The <see cref="IDomainEventDispatcher"/>.</param> /// <param name="events">The <see cref="IEnumerable{T}"/> of <see cref="IDomainEvent"/>.</param> /// <returns></returns> protected virtual async Task DispatchEventsAsync(IDomainEventDispatcher dispatcher, IEnumerable <IDomainEvent> events) { foreach (var @event in events) { await dispatcher.RaiseAsync(@event); } }
public RankingFamilyManager(IDomainEventDispatcher domainEventDispatcher, IScoreFamilyServiceManager scoreFamilyServiceManager) { this._domainEventDispatcher = domainEventDispatcher; this._scoreFamilyServiceManager = scoreFamilyServiceManager; ALLOWED_STATUS_IDS = GetAllowedStatusId(); }
public AppDbContext( TenantInfo tenantInfo, DbContextOptions <AppDbContext> options, IDomainEventDispatcher dispatcher) : this(tenantInfo, options) { _dispatcher = dispatcher; }
public AccountDomainRepository( IAccountDataRepository accountDataRepository, IDomainEventDispatcher domainEventDispatcher) { _accountDataRepository = accountDataRepository; _domainEventDispatcher = domainEventDispatcher; }
public RealEstateContext( DbContextOptions <RealEstateContext> options, IDomainEventDispatcher domainEventDispatcher) : base(options) { _domainEventDispatcher = domainEventDispatcher; }
public RejectSubmissionHandler(ISubmissionRepository submissionRepository, IDomainEventDispatcher domainEventDispatcher, IEventMapper eventMapper, IMessageBroker messageBroker) { _submissionRepository = submissionRepository; _domainEventDispatcher = domainEventDispatcher; _eventMapper = eventMapper; _messageBroker = messageBroker; }
public PostRepository(IHostingEnvironment environment, IMemoryCache memoryCache, IDomainEventDispatcher dispatcher) { this.environment = environment; this.memoryCache = memoryCache; this.dispatcher = dispatcher; folder = environment.ContentRootPath + "\\Data\\Posts\\"; }
private static ISessionFactory BuildSessionFactory(string connectionString, IDomainEventDispatcher domainEventDispatcher) { FluentConfiguration configuration = Fluently.Configure() .Database(MsSqlConfiguration.MsSql2012.ConnectionString(connectionString)) .Mappings(m => m.FluentMappings .AddFromAssembly(Assembly.GetExecutingAssembly()) .Conventions.Add( ForeignKey.EndsWith("Id"), ConventionBuilder.Property .When(criteria => criteria.Expect(x => x.Nullable, Is.Not.Set), x => x.Not.Nullable())) .Conventions.Add <TableNameConvention>() .Conventions.Add <HiLoConvention>() ) .ExposeConfiguration(x => { //to create db tables //new SchemaExport(x).Execute(true, true, false); x.EventListeners.PostCommitUpdateEventListeners = new IPostUpdateEventListener[] { new NHibernateDbEventListener(domainEventDispatcher) }; x.EventListeners.PostCommitInsertEventListeners = new IPostInsertEventListener[] { new NHibernateDbEventListener(domainEventDispatcher) }; x.EventListeners.PostCommitDeleteEventListeners = new IPostDeleteEventListener[] { new NHibernateDbEventListener(domainEventDispatcher) }; x.EventListeners.PostCollectionUpdateEventListeners = new IPostCollectionUpdateEventListener[] { new NHibernateDbEventListener(domainEventDispatcher) }; }); return(configuration.BuildSessionFactory()); }
public ApplicationDbContext(DbContextOptions options, IDomainEventDispatcher domainEventDispatcher, IConfiguration configuration) : base(options) { _domainEventDispatcher = domainEventDispatcher; _useConsoleEfLogger = Convert.ToBoolean(configuration[ConfigurationKeys.UseConsoleEfLogger]); }
private EventStore(IDomainEventDispatcher domainEventDispatcher) { _eventStoreContext = new EventStoreDbContext(new DbContextOptionsBuilder <EventStoreDbContext>() .UseInMemoryDatabase(databaseName: "EventStore") .EnableSensitiveDataLogging() .Options); _domainEventDispatcher = domainEventDispatcher; }
public ReglasStonePaperScissorsSteps() { dispatcher = new DomainEventDispatcher(); match = new Match(dispatcher); player1 = new Player1(dispatcher); player2 = new Player2(dispatcher); outcome = new Outcome(dispatcher); }
public void DispatchAndClearAccumulatedEvents(IDomainEventDispatcher eventDispatcher) { foreach (var domainEvent in this._events) { eventDispatcher.Dispatch(domainEvent); } this._events.Clear(); }
public ApproveSubmissionHandler(ISubmissionRepository repository, IMessageBroker messageBroker, IEventMapper eventMapper, IDomainEventDispatcher dispatcher) { _repository = repository; _messageBroker = messageBroker; _eventMapper = eventMapper; _dispatcher = dispatcher; }
public HomeController(IWebHostEnvironment webHostEnvironment, IDomainEventDispatcher dispatcher, ILogger <HomeController> logger) { _webHostEnvironment = webHostEnvironment; _dispatcher = dispatcher; _logger = logger; }
public ApplicationDbContext( DbContextOptions <ApplicationDbContext> options, IOptions <OperationalStoreOptions> operationalStoreOptions, IDomainEventDispatcher dispatcher ) : base(options, operationalStoreOptions) { _dispatcher = dispatcher; }
public DailyCheckService(ILogger <DailyCheckService> logger, IDomainEventDispatcher dispatcher, IRepository <DailyCheck> repository) { _logger = logger; _dispatcher = dispatcher; _repository = repository; }
public GenerateResourcesCommandHandler(IDomainEventDispatcher eventDispatcher, ICommandDispatcher commandDispatcher, ITranslateResourceFactory translateResourceFactory, IGetLocaleById getLocaleById, IGetAllResourcesByApplicationIdAndLocaleId getAllResourcesByApplicationIdAndLocaleId) { _eventDispatcher = eventDispatcher; _commandDispatcher = commandDispatcher; _translateResourceFactory = translateResourceFactory; _getLocaleById = getLocaleById; _getAllResourcesByApplicationIdAndLocaleId = getAllResourcesByApplicationIdAndLocaleId; }
public CreateUserHandler(IMemberShipRepository memberShipRepository, IPasswordHasher passwordHasher, IDomainEventDispatcher domainEventDispatcher, ILogger logger) { _memberShipRepository = memberShipRepository; _passwordHasher = passwordHasher; _domainEventDispatcher = domainEventDispatcher; _logger = logger; }
public AspNetCoreIdentityUserRoleMembershipService(UserManager <ApplicationUser> userManager, RoleManager <IdentityRole> roleManager, IDomainEventDispatcher dispatcher) { _userManager = userManager; _roleManager = roleManager; _dispatcher = dispatcher; }
public MongoRepository(IBaseMongoRepositoryAdd repositoryAdd, IBaseMongoRepositoryUpdate repositoryUpdate, IBaseMongoRepositoryDelete repositoryDelete, IDomainEventDispatcher domainEventDispatcher) { _repositoryAdd = repositoryAdd; _repositoryUpdate = repositoryUpdate; _repositoryDelete = repositoryDelete; _domainEventDispatcher = domainEventDispatcher; }
public DomainEventDispatcherEventStoreTransactionAnnouncer(IEventStore eventStore, IDomainEventDispatcher dispatcher) : base(eventStore) { Contract.Requires(dispatcher != null); Contract.Requires(eventStore != null); _dispatcher = dispatcher; }
public ApprenticeshipIncentiveDomainRepository( IApprenticeshipIncentiveDataRepository apprenticeshipIncentiveDataRepository, IApprenticeshipIncentiveFactory apprenticeshipIncentiveFactory, IDomainEventDispatcher domainEventDispatcher) { _apprenticeshipIncentiveDataRepository = apprenticeshipIncentiveDataRepository; _apprenticeshipIncentiveFactory = apprenticeshipIncentiveFactory; _domainEventDispatcher = domainEventDispatcher; }
public SchemeUnpublishRequestHandler( IOptions <AggregatesConfig> cacheConfig, IMemoryCache memoryCache, IDomainEventDispatcher <PublicSchemeId> domainEventsDispatcher, IAggregateSnapshotAccessor <PublicScheme, PublicSchemeId> schemesSnapshot, IDomainEventStore <PublicSchemeId> eventsAccessor) : base(cacheConfig, memoryCache, domainEventsDispatcher, schemesSnapshot, eventsAccessor) { }
public GameWeekHandler(IRepository repository, ITimerService timer, IDomainEventDispatcher dispatcher) { _repository = repository; _timer = timer; _dispatcher = dispatcher; _season = _repository.Get(new CurrentSeasonWithStandingsTeams()); _games = _repository.List(new GamesOnDate(_season.CurDate)); _teams = _repository.List(new TeamWithRecord()); }
public MailServiceDbContext(DbContextOptions <MailServiceDbContext> options, IClock clock, ICurrentUserService currentUserService, IDomainEventDispatcher eventDispatcher, ILogger <MailServiceDbContext> logger) : base(options) { _logger = logger; _eventDispatcher = eventDispatcher; _currentUserService = currentUserService; _clock = clock; }
public PersonRepository(ISession session, IDomainEventDispatcher domainEventDispatcher) { _domainEventDispatcher = domainEventDispatcher; _personDao = new PersonDao(session.GetPort<System.Data.Common.DbConnection>()); }
/// <summary> /// Assign a new service resolver implementation. /// </summary> /// <param name="dispatcher">Resolver to use.</param> public static void Assign(IDomainEventDispatcher dispatcher) { if (dispatcher == null) throw new ArgumentNullException("dispatcher"); _dispatcher = dispatcher; }
public DbContext(IDomainEventDispatcher domainEventDispatcher) { _domainEventDispatcher = domainEventDispatcher; }
public DapperEventStore(ISerializer serializer, IDomainEventDispatcher dispatcher, DapperEventStoreSettings settings) { _serializer = serializer; _dispatcher = dispatcher; _settings = settings; }