public override void SetUp()
        {
            base.SetUp();
            _node = new MiniNode(PathName);
            _node.Start();

            _firstEvent = TestEvent.NewTestEvent();

            _connection = EventStoreConnection.Create();
            _connection.Connect(_node.TcpEndPoint);

            _connection.AppendToStream("test-stream",
                                       ExpectedVersion.NoStream,
                                       _firstEvent,
                                       TestEvent.NewTestEvent(),
                                       TestEvent.NewTestEvent());

            using (var transaction = _connection.StartTransaction("test-stream", 3))
            {
                transaction.Commit();
            }
        }
 public void SetUp()
 {
     _connection = EventStoreConnection.Create();
     _connection.Connect(IntegrationTestTcpEndPoint);
     _repo = new GetEventStoreRepository(_connection);
 }
 private StorageService()
 {
     _connection = EventStoreConnection.Create();
     _connection.Connect(new IPEndPoint(new IPAddress(new byte[] { 127, 0, 0, 1 }), 1113)); // todo: configure it
 }
Ejemplo n.º 4
0
        static void Main(string[] args)
        {
            var port = new SerialPort("/dev/ttyUSB0", 2400, Parity.Even, 7) {Handshake = Handshake.XOnXOff};

            esCon = EventStoreConnection.Create();
            esCon.Connect(new IPEndPoint(IPAddress.Parse("10.3.1.103"),1113));

            //port.DataReceived += DataReceivedHandler;
            port.Open();

            var readerThread = new Thread(ReceivedBalanceReading);
            readerThread.Start(port);

            Console.WriteLine("Press any key to continue...");
            Console.WriteLine();
            Console.ReadKey();
            port.Close();
            readerThread.Abort();
        }