예제 #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);
            }
        }
예제 #2
0
 public static Task <ReadResult> ReadEventStreamAsync(string stream, int start, int count)
 {
     return(_connection.ReadEventStreamAsync(stream, start, count));
 }
예제 #3
0
파일: Usage.cs 프로젝트: ToJans/EventStore
        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);
            }
        }