Esempio n. 1
0
        public async Task Should_be_able_to_store_and_read_record()
        {
            await _sut.Open();

            await _sut.Enqueue("Hello world");

            var msg = await _sut.Dequeue();

            msg.Message.Should().Be("Hello world");
        }
Esempio n. 2
0
        private static async Task Main()
        {
            var queue = new QueueFile(@"C:\Temp\Queues", "Mine");
            await queue.Open();

            await queue.Enqueue(new MyMessage("go go 2"));


            var tasks = new[]
            {
                Application1(),
                Application2()
            };
            await Task.WhenAll(tasks);


            //var message = await queue.Dequeue();

            Console.WriteLine("Hello World!");
        }