Пример #1
0
        public EventStoreConnection(
            IEventStoreConnectionState connectionState,
            IEventJournal journal,
            INotificationHub notificationHub,
            IPendingNotifications pendingNotifications,
            IEventStreamConsumers consumers,
            IEventStreamConsumingSessionFactory sessionFactory,
            IEventMutationPipelineFactory pipelineFactory,
            IConsumersService consumersService)
        {
            Require.NotNull(connectionState, nameof(connectionState));
            Require.NotNull(journal, nameof(journal));
            Require.NotNull(notificationHub, nameof(notificationHub));
            Require.NotNull(pendingNotifications, nameof(pendingNotifications));
            Require.NotNull(consumers, nameof(consumers));
            Require.NotNull(sessionFactory, nameof(sessionFactory));
            Require.NotNull(pipelineFactory, nameof(pipelineFactory));
            Require.NotNull(consumersService, nameof(consumersService));

            m_connectionState      = connectionState;
            m_journal              = journal;
            m_notificationHub      = notificationHub;
            m_pendingNotifications = pendingNotifications;
            m_consumers            = consumers;
            m_sessionFactory       = sessionFactory;
            m_pipelineFactory      = pipelineFactory;
            ConsumersService       = consumersService;

            m_connectionState.ChangeToCreated(this);
        }
Пример #2
0
        public EventStoreConnection(
            IEventStoreConnectionState connectionState,
            IEventJournal journal,
            INotificationHub notificationHub,
            IPendingNotifications pendingNotifications,
            IEventStreamConsumers consumers,
            IEventStreamConsumingSessionFactory sessionFactory,
            IEventMutationPipelineFactory pipelineFactory)
        {
            Require.NotNull(connectionState, "connectionState");
            Require.NotNull(journal, "journal");
            Require.NotNull(notificationHub, "notificationHub");
            Require.NotNull(pendingNotifications, "pendingNotifications");
            Require.NotNull(consumers, "consumers");
            Require.NotNull(sessionFactory, "sessionFactory");
            Require.NotNull(pipelineFactory, "pipelineFactory");

            m_connectionState      = connectionState;
            m_journal              = journal;
            m_notificationHub      = notificationHub;
            m_pendingNotifications = pendingNotifications;
            m_consumers            = consumers;
            m_sessionFactory       = sessionFactory;
            m_pipelineFactory      = pipelineFactory;

            m_connectionState.ChangeToCreated(this);
        }
Пример #3
0
        protected EventStreamInteractionEntity(string streamName, IEventStoreConnectionState connectionState)
        {
            Require.NotEmpty(streamName, "streamName");
            Require.NotNull(connectionState, "connectionState");

            m_streamName      = streamName;
            m_connectionState = connectionState;
        }
Пример #4
0
        public EventStreamReader(
            string streamName,
            IEventStoreConnectionState connectionState,
            IEventStreamCursor streamCursor,
            IEventMutationPipeline mutationPipeline) : base(streamName, connectionState)
        {
            Require.NotNull(streamCursor, "streamCursor");
            Require.NotNull(mutationPipeline, "mutationPipeline");

            m_streamCursor     = streamCursor;
            m_mutationPipeline = mutationPipeline;
        }
        public PersistentEventStreamReaderFactory(
            EventStreamReaderId readerId,
            IEventJournal journal,
            IEventStoreConnectionState connectionState,
            IEventMutationPipeline mutationPipeline,
            EventStreamConsumerConfiguration configuration)
        {
            Require.NotNull(readerId, "readerId");
            Require.NotNull(journal, "journal");
            Require.NotNull(connectionState, "connectionState");
            Require.NotNull(mutationPipeline, "mutationPipeline");
            Require.NotNull(configuration, "configuration");

            m_readerId         = readerId;
            m_journal          = journal;
            m_connectionState  = connectionState;
            m_mutationPipeline = mutationPipeline;
            m_configuration    = configuration;
        }
Пример #6
0
        public EventStreamWriter(
            string streamName,
            IEventStoreConnectionState connectionState,
            EventStreamHeader endOfStream,
            IEventJournal journal,
            IEventMutationPipeline mutationPipeline,
            INotificationHub notificationHub,
            IPendingNotifications pendingNotification) : base(streamName, connectionState)
        {
            Require.NotEmpty(streamName, "streamName");
            Require.NotNull(journal, "journal");
            Require.NotNull(mutationPipeline, "mutationPipeline");
            Require.NotNull(notificationHub, "notificationHub");
            Require.NotNull(pendingNotification, "pendingNotification");

            m_endOfStream         = endOfStream;
            m_journal             = journal;
            m_mutationPipeline    = mutationPipeline;
            m_notificationHub     = notificationHub;
            m_pendingNotification = pendingNotification;
        }