public ViewBuilderService(EventStoreConnection eventStoreConnection, IEventStoreSerializer serializer, IDocumentStore store, IModelUpdateNotifier updateNotifier) { _eventStoreConnection = eventStoreConnection; _serializer = serializer; _store = store; _updateNotifier = updateNotifier; }
public EventStore(IEventStoreDb db, IEventStoreBus bus, IEventStoreSerializer serializer) { this.db = db; this.bus = bus; this.serializer = serializer; }
public EventStore(IEventStoreDb db, IEventStoreBus bus, IEventStoreSerializer serializer, ILoggerFactory loggerFactory) { this.db = db; this.bus = bus; this.serializer = serializer; this.logger = loggerFactory.GetLogger(typeof(EventStore)); }
public EventStoreSpecs() { this.serializer = new EventStoreSerializer(new[] { typeof(Event1), typeof(Event2) }); this.bus = new Mock <IEventStoreBus>().Object; var loggerFactoryMock = new Mock <ILoggerFactory>(); loggerFactoryMock.Setup(x => x.GetLogger(It.IsAny <Type>())) .Returns(new Mock <ILogger>().Object); this.loggerFactory = loggerFactoryMock.Object; }
public EventStoreSpecs() { this.serializer = new EventStoreSerializer(new[] { typeof(Event1), typeof(Event2) }); this.bus = new Mock<IEventStoreBus>().Object; }
public EventStoreSpecs() { this.serializer = new EventStoreSerializer(new[] { typeof(Event1), typeof(Event2) }); this.bus = new Mock <IEventStoreBus>().Object; }
public HostEventSource(IOptions <EventStoreConnectionSettings> connectionSettingsAccessor, IEventStoreSerializer serializer) : base(connectionSettingsAccessor.Value, serializer) { var connectionSettings = connectionSettingsAccessor.Value; var connectionSettingsBuilder = ConnectionSettings.Create().KeepReconnecting(); var point = IpEndPointUtility.CreateIpEndPoint(connectionSettings.Host + ":" + connectionSettings.Port).Result; Connection = EventStoreConnection.Create(connectionSettingsBuilder, point); Connection.ConnectAsync().Wait(); }
public void Initialize() { _serializer = new JsonEventStoreSerializer(); }
/// <summary> /// Initializes a new instance of the <see cref="EventSource"/> class. /// </summary> /// <param name="connectionSettings">EventStore connections string</param> /// <param name="serializer">events serializator</param> protected EventSource(EventStoreConnectionSettings connectionSettings, IEventStoreSerializer serializer) { _serializer = serializer; _credentials = new UserCredentials(connectionSettings.Login, connectionSettings.Pass); }
public ClusterEventSource(IOptions <EventStoreConnectionSettings> connectionSettingsAccessor, IEventStoreSerializer serializer) : base(connectionSettingsAccessor.Value, serializer) { var connectionSettings = connectionSettingsAccessor.Value; var connectionSettingsBuilder = ConnectionSettings.Create().KeepReconnecting(); Connection = EventStoreConnection.Create( connectionSettingsBuilder, ClusterSettings.Create().DiscoverClusterViaDns() .SetClusterDns(connectionSettings.ClusterDns) .SetClusterGossipPort(connectionSettings.GossipPort)); Connection.ConnectAsync().Wait(); }