コード例 #1
0
        static void Main()
        {
            _actorSystem = ActorSystem.Create("tarantool");
            var connection = _actorSystem.ActorOf(Tarantool.Create());

            connection.Ask(Request
                           .Select()
                           .WithSpaceId(512)
                           .WithIndexId(0)
                           .WithIterator(Iterator.ALL)
                           .Build())
            .Result
            .Match()
            .With <Failure>(f =>
            {
                Console.WriteLine($"Error: {f.Exception}");
            })
            .With <Response>(r =>
            {
                foreach (var tuple in r.Body)
                {
                    Console.WriteLine(tuple);
                }
            });

            Console.ReadLine();
        }
コード例 #2
0
        public TarantoolClientTest()
        {
            _tarantool = ActorOfAsTestActorRef <Tarantool>(Tarantool.Create(port: 3301, listeners: new HashSet <IActorRef> {
                TestActor
            }));

            ExpectMsg <Connection.Connecting>();
            ExpectMsg <Connection.Connected>();
        }