public ViewBuilderService(EventStoreConnection eventStoreConnection, IEventStoreSerializer serializer,  IDocumentStore store, IModelUpdateNotifier updateNotifier)
 {
     _eventStoreConnection = eventStoreConnection;
     _serializer = serializer;
     _store = store;
     _updateNotifier = updateNotifier;
 }
示例#2
0
 public EventStore(IEventStoreDb db,
                   IEventStoreBus bus,
                   IEventStoreSerializer serializer)
 {
     this.db         = db;
     this.bus        = bus;
     this.serializer = serializer;
 }
示例#3
0
 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;
        }
示例#6
0
 public EventStoreSpecs()
 {
     this.serializer = new EventStoreSerializer(new[] { typeof(Event1), typeof(Event2) });
     this.bus = new Mock<IEventStoreBus>().Object;
 }
示例#7
0
 public EventStoreSpecs()
 {
     this.serializer = new EventStoreSerializer(new[] { typeof(Event1), typeof(Event2) });
     this.bus        = new Mock <IEventStoreBus>().Object;
 }
示例#8
0
        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();
 }
示例#10
0
 /// <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);
 }
示例#11
0
        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();
        }