Пример #1
0
        public static async Task <FakeAuctionServer> Create(string firstItemId)
        {
            Console.Title = "AuctionServer";
            var server = new FakeAuctionServer(firstItemId);
            ServiceCollection services = new ServiceCollection();

            services.AddSingleton <FakeAuctionServer>(server);
            server.nserviceBusEndpoint = new NserviceBusEndpoint("AuctionServer", services);
            await server.nserviceBusEndpoint.StartAsync(services.BuildServiceProvider());

            return(server);
        }
        public async Task Setup()
        {
            auction = await FakeAuctionServer.Create("item-1234");

            application = new ApplicationRunner();
        }