Example #1
0
        public void read_from()
        {
            write_to();
            write_to();

            var endpoint = new IPEndPoint(IPAddress.Parse("127.0.0.1"), 1113);

            using (var connection = new EventStoreConnection(endpoint))
            {
                var task = connection.ReadEventStreamAsync("test", 0, 2);
                task.Wait();

                var result = task.Result;
                Assert.AreEqual(result.Events.Length, 2);
            }
        }
Example #2
0
 public static Task <ReadResult> ReadEventStreamAsync(string stream, int start, int count)
 {
     return(_connection.ReadEventStreamAsync(stream, start, count));
 }
Example #3
0
        public void read_from()
        {
            write_to();
            write_to();

            var endpoint = new IPEndPoint(IPAddress.Parse("127.0.0.1"), 1113);
            using (var connection = new EventStoreConnection(endpoint))
            {
                var task = connection.ReadEventStreamAsync("test", 0, 2);
                task.Wait();

                var result = task.Result;
                Debug.Assert(result.Events.Length == 2);
            }
        }