コード例 #1
0
        static void Main(string[] args)
        {
            var tcpEndpoint = new IPEndPoint(IPAddress.Parse("127.0.0.1"), 1113);
            using (var connection = EventStoreConnection.Create())
            {
                connection.Connect(tcpEndpoint);

                var pullSource = new AllEventStreamsPullSource(connection);
                var pushSource = new AllEventStreamsPushSource(connection);

                var selector = new EventSourceSelector(pullSource, pushSource, new RecordedEventIdentityExtractor());
                selector.Event += OnEvent;
                selector.Start();

                Console.WriteLine("Press <enter> to exit.");
                Console.ReadLine();
                selector.Stop();
            }
        }
コード例 #2
0
        static void Main(string[] args)
        {
            var tcpEndpoint = new IPEndPoint(IPAddress.Parse("127.0.0.1"), 1113);

            using (var connection = EventStoreConnection.Create())
            {
                connection.Connect(tcpEndpoint);

                var pullSource = new AllEventStreamsPullSource(connection);
                var pushSource = new AllEventStreamsPushSource(connection);

                var selector = new EventSourceSelector(pullSource, pushSource, new RecordedEventIdentityExtractor());
                selector.Event += OnEvent;
                selector.Start();

                Console.WriteLine("Press <enter> to exit.");
                Console.ReadLine();
                selector.Stop();
            }
        }