public FakeOandaTestServer(FakeOandaContext context) : base(new WebHostBuilder() .ConfigureServices(services => services.Add(new ServiceDescriptor(typeof(FakeOandaContext), context))) .UseStartup <FakeOandaStartup>()) { this.context = context; }
public FakeOandaWebHost() { context = new FakeOandaContext(); this.webHost = WebHost.CreateDefaultBuilder() .UseUrls(URL_TO_LISTEN) .ConfigureServices(services => services.Add(new ServiceDescriptor(typeof(FakeOandaContext), context))) .UseStartup <FakeOandaStartup>() .Build(); }
public FakeOandaMiddleware(RequestDelegate next, FakeOandaContext context) { _next = next ?? throw new ArgumentNullException(nameof(next)); _context = context; }
public FakeOandaStartup(FakeOandaContext context) { this.context = context; }