示例#1
0
        private void ConnectToLiveES()
        {
            var userCredentials = new ReactiveDomain.UserCredentials(username: "******", password: "******");

            var eventStoreLoader = new EventStoreLoader();

            eventStoreLoader.Connect(
                credentials: userCredentials,
                server: IPAddress.Parse("127.0.0.1"),
                tcpPort: 1113);

            Connection = eventStoreLoader.Connection;

            // ReSharper disable once PossibleNullReferenceException
            _connection = (IEventStoreConnection)typeof(EventStoreConnectionWrapper)
                          .GetField("_conn", BindingFlags.NonPublic | BindingFlags.Instance)
                          .GetValue(eventStoreLoader.Connection);

            log.Info("Connected to ES");
        }