Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            var mre = new ManualResetEvent(false);

            var connection = new EventStore.ClientAPI.EventStoreConnection(new IPEndPoint(IPAddress.Parse("127.0.0.1"), 1113));


            var pub = new Event_Publisher(connection, "storeId");
            pub.Reset();
            pub.Start();

            Console.ReadLine();
            //mre.WaitOne();
            return;

            try
            {

                connection.SubscribeToAllStreamsAsync((ev, pos) =>
                {
                    Console.WriteLine("{0} : {1}, {2}",ev.EventNumber, ev.EventType, ev.EventStreamId);
                    Console.ReadLine();
                }, () => { });

                mre.WaitOne();

            }
            catch (Exception ex)
            {
            }
        }
        public void subscribe_to_all_events()
        {
            var connection = new EventStore.ClientAPI.EventStoreConnection(new IPEndPoint(IPAddress.Parse("127.0.0.1"), 1113));

            try
            {

                connection.SubscribeToAllStreamsAsync((ev, pos) => 
                {
                    
                }, () => { });

                
                
            }
            catch (Exception ex)
            {
            }
        }