File tree Expand file tree Collapse file tree
Examples/BookingSystem.AspNetFramework/Utils Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33using Microsoft . Extensions . DependencyInjection ;
44using Microsoft . Extensions . Logging ;
55// using Microsoft.Extensions.Logging.Console;
6+ using Microsoft . Extensions . Logging . Abstractions ;
67using OpenActive . Server . NET ;
78using System . Configuration ;
89using System . Web . Http ;
@@ -36,9 +37,8 @@ public static void Register(HttpConfiguration config)
3637 services . AddTransient < OpenBookingController > ( ) ;
3738 // var logger = LoggerFactory.AddConsole().CreateLogger<FakeBookingSystem>();
3839 // var logger = new ILogger<FakeBookingSystem>();
39- // var logger = new NullLogger<FakeBookingSystem>();
40- // new FakeBookingSystem(false, logger)
41- services . AddSingleton < IBookingEngine > ( sp => EngineConfig . CreateStoreBookingEngine ( appSettings , sp . GetRequiredService < FakeBookingSystem > ( ) ) ) ;
40+ var logger = new NullLogger < FakeBookingSystem > ( ) ;
41+ services . AddSingleton < IBookingEngine > ( sp => EngineConfig . CreateStoreBookingEngine ( appSettings , new FakeBookingSystem ( false , logger ) ) ) ;
4242
4343 var resolver = new DependencyResolver ( services . BuildServiceProvider ( true ) ) ;
4444 config . DependencyResolver = resolver ;
You can’t perform that action at this time.
0 commit comments