コード例 #1
0
 public static IFlightProvider GetFlightProvider()
 {
     Lock.EnterReadLock();
     try
     {
         {
             if (_provider == null)
             {
                 if (Configuration.IsMock)
                     _provider = new MockFlightProvider();
                 else
                     _provider = new FlightProvider(CacheProviderFactory.GetFlightResultsCacheProvider());
             }
         }
     }
     finally
     {
         Lock.ExitReadLock();
     }
     return _provider;
 }
コード例 #2
0
        public FlightController(IFlightProvider flightProvider)
        {
            Condition.Requires(flightProvider, nameof(flightProvider)).IsNotNull();

            _flightProvider = flightProvider;
        }