/// <summary> /// See base docs. /// </summary> protected override void DoInitialise() { _AutoConfigDatabase = Factory.Singleton.Resolve <IAutoConfigBaseStationDatabase>().Singleton; _AutoConfigDatabase.Database.AircraftUpdated += BaseStationDatabase_AircraftUpdated; _AutoConfigDatabase.Database.FileNameChanged += BaseStationDatabase_FileNameChanged; _AircraftOnlineLookupManager = Factory.Singleton.Resolve <IAircraftOnlineLookupManager>().Singleton; _AircraftOnlineLookupManager.AircraftFetched += AircraftOnlineLookupManager_AircraftFetched; _PictureManager = Factory.Singleton.Resolve <IAircraftPictureManager>().Singleton; var autoConfigurationPictureFolderCache = Factory.Singleton.Resolve <IAutoConfigPictureFolderCache>().Singleton; _PictureFolderCache = autoConfigurationPictureFolderCache.DirectoryCache; autoConfigurationPictureFolderCache.CacheConfigurationChanged += AutoConfigPictureFolderCache_CacheConfigurationChanged; _StandingDataManager = Factory.Singleton.Resolve <IStandingDataManager>().Singleton; _StandingDataManager.LoadCompleted += StandingDataManager_LoadCompleted; if (_PictureLookupThread == null) { _PictureLookupThread = new BackgroundThreadQueue <LookupPictureDetail>("PictureLookup", BackgroundThreadQueueMechanism.ThreadPool); _PictureLookupThread.MaximumParallelThreads = 10; _PictureLookupThread.StartBackgroundThread(PictureLookupThread_ProcessLookup, PictureLookupThread_ProcessException); } base.DoInitialise(); }
/// <summary> /// Creates a new object. /// </summary> public ImageServer() { _ImageServerConfiguration = Factory.ResolveSingleton <IImageServerConfiguration>(); _SharedConfiguration = Factory.ResolveSingleton <ISharedConfiguration>(); _Graphics = Factory.ResolveSingleton <IWebSiteGraphics>(); _AircraftPictureManager = Factory.ResolveSingleton <IAircraftPictureManager>(); _AutoConfigPictureFolderCache = Factory.ResolveSingleton <IAutoConfigPictureFolderCache>(); }
public void TestInitialise() { _OriginalClassFactory = Factory.TakeSnapshot(); _ConfigurationStorage = TestUtilities.CreateMockSingleton<IConfigurationStorage>(); _Configuration = new Configuration(); _ConfigurationStorage.Setup(c => c.Load()).Returns(_Configuration); _DirectoryCache = new Mock<IDirectoryCache>() { DefaultValue = DefaultValue.Mock }.SetupAllProperties(); _CacheCleared = new EventRecorder<EventArgs>(); _PictureManager = Factory.Singleton.Resolve<IAircraftPictureManager>(); }
public void TestInitialise() { _OriginalClassFactory = Factory.TakeSnapshot(); _ConfigurationStorage = TestUtilities.CreateMockSingleton <IConfigurationStorage>(); _Configuration = new Configuration(); _ConfigurationStorage.Setup(c => c.Load()).Returns(_Configuration); _DirectoryCache = new Mock <IDirectoryCache>() { DefaultValue = DefaultValue.Mock }.SetupAllProperties(); _CacheCleared = new EventRecorder <EventArgs>(); _PictureManager = Factory.Singleton.Resolve <IAircraftPictureManager>(); }
/// <summary> /// Creates a new object. /// </summary> public ReportRowsJsonPage() : base() { _PictureManager = Factory.Singleton.Resolve <IAircraftPictureManager>().Singleton; _PictureFolderCache = Factory.Singleton.Resolve <IAutoConfigPictureFolderCache>().Singleton.DirectoryCache; }
/// <summary> /// Creates a new object. /// </summary> public BaseStationAircraftList() { Provider = new DefaultProvider(); _PictureManager = Factory.Singleton.Resolve<IAircraftPictureManager>().Singleton; _PictureDirectoryCache = Factory.Singleton.Resolve<IAutoConfigPictureFolderCache>().Singleton.DirectoryCache; _PictureDirectoryCache.CacheChanged += PictureDirectoryCache_CacheChanged; _PictureLookupQueue.StartBackgroundThread(SearchForPicture, (ex) => { OnExceptionCaught(new EventArgs<Exception>(ex)); }); _DatabaseLookupQueue.StartBackgroundThread(LoadAircraftDetails, (ex) => { OnExceptionCaught(new EventArgs<Exception>(ex)); }); }
/// <summary> /// Creates a new object. /// </summary> public ReportRowsJsonPage() : base() { _PictureManager = Factory.Singleton.Resolve<IAircraftPictureManager>().Singleton; _PictureFolderCache = Factory.Singleton.Resolve<IAutoConfigPictureFolderCache>().Singleton.DirectoryCache; }
/// <summary> /// Creates a new object. /// </summary> public ImagePage() { _PictureManager = Factory.Singleton.Resolve <IAircraftPictureManager>().Singleton; _PictureFolderCache = Factory.Singleton.Resolve <IAutoConfigPictureFolderCache>().Singleton.DirectoryCache; _ForceSingleThreadAccess = Factory.Singleton.Resolve <IRuntimeEnvironment>().Singleton.IsMono; }
/// <summary> /// Creates a new object. /// </summary> public ImagePage(WebSite webSite) : base(webSite) { _Graphics = Factory.Singleton.Resolve <IWebSiteGraphics>().Singleton; _PictureManager = Factory.Singleton.Resolve <IAircraftPictureManager>().Singleton; _PictureFolderCache = Factory.Singleton.Resolve <IAutoConfigPictureFolderCache>().Singleton.DirectoryCache; }
/// <summary> /// Creates a new object. /// </summary> public ImagePage() { _PictureManager = Factory.Singleton.Resolve<IAircraftPictureManager>().Singleton; _PictureFolderCache = Factory.Singleton.Resolve<IAutoConfigPictureFolderCache>().Singleton.DirectoryCache; _ForceSingleThreadAccess = Factory.Singleton.Resolve<IRuntimeEnvironment>().Singleton.IsMono; }
/// <summary> /// Creates a new object. /// </summary> public ReportRowsJsonPage(WebSite webSite) : base(webSite) { _PictureManager = Factory.Singleton.Resolve <IAircraftPictureManager>().Singleton; _PictureFolderCache = Factory.Singleton.Resolve <IAutoConfigPictureFolderCache>().Singleton.DirectoryCache; _CallsignParser = Factory.Singleton.Resolve <ICallsignParser>(); }