public GIVEN_store_and_bus_with_an_aggregate_in_memory() { DbConfiguration.SetConfiguration(new TransientFaultHandlingDbConfiguration()); this.serializer = CreateSerializer(); this.dbName = typeof(EventStoreFixture).Name; var connectionFactory = System.Data.Entity.Database.DefaultConnectionFactory; this.connectionString = connectionFactory.CreateConnection(this.dbName).ConnectionString; // ********************************* // EN FECOPROD: this.connectionString = string.Format("server=(local);Database={0};User Id=sa;pwd =123456", this.dbName); // BORRAR CUANDO SEA NECESARIO //*********************************** using (var context = new EventStoreDbContext(this.connectionString)) { if (context.Database.Exists()) { context.Database.Delete(); } context.Database.Create(); } this.bus = new InMemoryBus(); MessagingDbInitializer.CreateDatabaseObjects(this.connectionString, "Bus"); }
public EventStoreRebuilderEngine( IInMemoryBus bus, ICommandProcessor commandProcessor, ICommandHandlerRegistry commandHandlerRegistry, IEventDispatcher eventDispatcher, ITextSerializer serializer, IMetadataProvider metadataProvider, ITracer tracer, IEventStoreRebuilderConfig config, IRebuilderPerfCounter perfCounter) { this.bus = bus; this.serializer = serializer; this.eventDispatcher = eventDispatcher; this.commandProcessor = commandProcessor; this.commandHandlerRegistry = commandHandlerRegistry; this.config = config; this.tracer = tracer; this.metadataProvider = metadataProvider; this.perfCounter = perfCounter; this.sourceContextFactory = () => { var context = new EventStoreDbContext(this.config.SourceEventStoreConnectionString); context.Configuration.AutoDetectChangesEnabled = false; return(context); }; this.newContextFactory = () => new EventStoreDbContext(this.config.NewEventStoreConnectionString); }
public RaceEntriesController(IInMemoryBus bus,PersonQueryService personQuery,RaceQueryService raceQuery, PersonEventQueryService personEventQueryService) { Bus = bus; PersonQueryService = personQuery; RaceQueryService= raceQuery; RaceEntryQyerService = personEventQueryService; }
public CreateUserHandler(ILogger <CreateUserHandler> logger, IEventStoreHydrator <Guid, UserEventStore> hydrator, ICommandStrategyFactory <UserCommandContext> commandStrategyFactory, IInMemoryBus bus) { _strategy = commandStrategyFactory.Get <CreateUser>(); _logger = logger; _hydrator = hydrator; _bus = bus; }
protected DomainServiceBase( DomainServiceParameters domainServiceParameters ) { UserSessionInfo = domainServiceParameters.UserSessionInfo; GlobalizationInfo = domainServiceParameters.GlobalizationInfo; InMemoryBus = domainServiceParameters.InMemoryBus; }
public CustomerMustHaveUniqueCodeSpecification( IInMemoryBus inMemoryBus, IUserSessionInfo userSessionInfo, IGlobalizationInfo globalizarionInfo) { _inMemoryBus = inMemoryBus; _userSessionInfo = userSessionInfo; _globalizarionInfo = globalizarionInfo; }
public PurchaseItemHandler(IInMemoryBus inMemoryBus, ICommandStrategyFactory <StoreFrontContext> commandStrategyFactory, ILogger <PurchaseItemHandler> logger, IInMemoryBus bus, IEventStoreHydrator <Guid, StoreFrontEventStore> hydrator) { _strategy = commandStrategyFactory.Get <PurchaseItem>(); _logger = logger; _bus = bus; _hydrator = hydrator; }
public HandlerBaseParameters( IInMemoryBus inMemoryBus, IUserSessionInfo userSessionInfo, IGlobalizationInfo globalizationInfo, DomainNotificationEventHandler domainNotificationEventHandler) { InMemoryBus = inMemoryBus; UserSessionInfo = userSessionInfo; GlobalizationInfo = globalizationInfo; DomainNotificationEventHandler = domainNotificationEventHandler; }
public DomainServiceParameters( IUserSessionInfo userSessionInfo, IGlobalizationInfo globalizationInfo, IInMemoryBus inMemoryBus, DomainNotificationEventHandler domainNotificationEventHandler) { UserSessionInfo = userSessionInfo; GlobalizationInfo = globalizationInfo; InMemoryBus = inMemoryBus; DomainNotificationEventHandler = domainNotificationEventHandler; }
public DomainNotificationEventHandler( IInMemoryBus inMemoryBus, IUserSessionInfo userSessionInfo, IGlobalizationInfo globalizationInfo ) { InMemoryBus = inMemoryBus; UserSessionInfo = userSessionInfo; GlobalizationInfo = globalizationInfo; DomainNotificationEventCollection = new List <DomainNotificationEvent>(); }
public InMemoryEventStore(IInMemoryBus bus, ITextSerializer serializer, EventStoreDbContext context, ITracer tracer, ISystemTime dateTime, ISnapshotProvider snapshoter, IMetadataProvider metadataProvider) : base(tracer, serializer, dateTime, snapshoter, metadataProvider) { this.bus = bus; this.context = context; }
public ItemController(IInMemoryBus bus) => _bus = bus;
public UserCreatedHandler(ILogger <UserCreatedHandler> logger, IInMemoryBus bus) { _logger = logger; _bus = bus; }
public TestController(IInMemoryBus localBus, TestQuery query) { this.localBus = localBus; this.query = query; }
public UserController(IInMemoryBus bus) => _bus = bus;
public RaceController(IInMemoryBus messageLocalBus,RaceQueryService raceQueryService) { this.raceQueryService = raceQueryService; this.localBus = messageLocalBus; }
public PersonController(PersonQueryService personQuery, IInMemoryBus localBus) { LocalBus = localBus; this.personQuery = personQuery; }
public ItemAddedHandler(ILogger <ItemAddedHandler> logger, IInMemoryBus bus) { _logger = logger; _bus = bus; }