示例#1
0
 public FakeOandaTestServer(FakeOandaContext context)
     : base(new WebHostBuilder()
            .ConfigureServices(services => services.Add(new ServiceDescriptor(typeof(FakeOandaContext), context)))
            .UseStartup <FakeOandaStartup>())
 {
     this.context = context;
 }
示例#2
0
 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;
 }
示例#4
0
 public FakeOandaStartup(FakeOandaContext context)
 {
     this.context = context;
 }