示例#1
0
 public EventStoreProvider(MemstateSettings memstateSettings)
 {
     _memstateSettings   = memstateSettings;
     _eventStoreSettings = new EventStoreSettings(memstateSettings);
     _connection         = EventStoreConnection.Create(_eventStoreSettings.ConnectionString);
     _connection.ConnectAsync().Wait();
 }
示例#2
0
 public EventStoreReader(MemstateSettings config, EventStoreSettings eventStoreSettings, IEventStoreConnection connection)
 {
     _logger         = config.CreateLogger <EventStoreReader>();
     _connection     = connection;
     _serializer     = config.Serializers.Create(eventStoreSettings.Serializer, config);
     _streamName     = eventStoreSettings.StreamName;
     _eventsPerSlice = eventStoreSettings.EventsPerSlice;
 }
示例#3
0
        public EventStoreProvider()
        {
            var config = Config.Current;

            _eventStoreSettings = config.GetSettings <EventStoreSettings>();
            //todo: consider opening the connection from Initialize
            _connection = EventStoreConnection.Create(_eventStoreSettings.ConnectionString);
            _connection.ConnectAsync().Wait();
        }
示例#4
0
        public EventStoreSubscriptionSource(IEventStoreConnection connection)
        {
            _logger     = LogProvider.GetCurrentClassLogger();
            _connection = connection;
            var config = Config.Current;

            _settings   = config.GetSettings <EventStoreSettings>();
            _serializer = config.CreateSerializer(_settings.SerializerName);
            _streamName = _settings.StreamName;
        }
示例#5
0
        public EventStoreSubscriptionSource(MemstateSettings settings, IEventStoreConnection connection)
        {
            _logger           = settings.CreateLogger <EventStoreSubscriptionSource>();
            _memstateSettings = settings;
            _connection       = connection;
            var eventStoreSettings = new EventStoreSettings(settings);

            _serializer = eventStoreSettings.CreateSerializer();
            _streamName = eventStoreSettings.StreamName;
        }
示例#6
0
        public EventStoreWriter(MemstateSettings settings, IEventStoreConnection connection)
            : base(settings)
        {
            _connection = connection;
            _logger     = settings.CreateLogger <EventStoreWriter>();
            var eventStoreSettings = new EventStoreSettings(settings);

            _serializer = eventStoreSettings.CreateSerializer();
            _streamName = eventStoreSettings.StreamName;
        }
示例#7
0
 public EventStoreSubscriptionAdapter(EventStoreSettings settings, EventStoreCatchUpSubscription subscription, Func <bool> ready)
 {
     _logger       = LogProvider.GetCurrentClassLogger();
     _subscription = subscription;
     _ready        = ready;
 }