/// <summary> /// Registers implementations against the class factory passed in. /// </summary> /// <param name="factory"></param> public static void Register(IClassFactory factory) { factory.Register <VirtualRadar.Interface.IMessageBox, MessageBoxWrapper>(); factory.Register <VirtualRadar.Interface.View.IMainView, MainView>(); factory.Register <VirtualRadar.Interface.View.IShutdownView, ShutdownView>(); factory.Register <VirtualRadar.Interface.View.ISplashView, SplashView>(); }
/// <summary> /// Registers implementations. /// </summary> /// <param name="factory"></param> public static void Register(IClassFactory factory) { factory.Register <AWhewell.Owin.Interface.ICompressResponseManipulator, CompressResponseManipulator>(); factory.Register <AWhewell.Owin.Interface.IPipeline, Pipeline>(); factory.Register <AWhewell.Owin.Interface.IPipelineBuilder, PipelineBuilder>(); factory.Register <AWhewell.Owin.Interface.IPipelineBuilderEnvironment, PipelineBuilderEnvironment>(); }
/// <summary> /// Initialises the class factory with all the standard implementations in this library. /// </summary> /// <param name="factory"></param> public static void Register(IClassFactory factory) { factory.Register<IAutoConfigWebServer, AutoConfigWebServer>(); factory.Register<IResponder, Responder>(); factory.Register<IWebServer, WebServer>(); if(Type.GetType("Mono.Runtime") == null) { factory.Register<IUniversalPlugAndPlayManager, DotNetUniversalPlugAndPlayManager>(); } else { factory.Register<IUniversalPlugAndPlayManager, MonoUniversalPlugAndPlayManager>(); } }
/// <summary> /// Initialises the class factory with all the standard implementations in this library. /// </summary> /// <param name="factory"></param> public static void Register(IClassFactory factory) { factory.Register <IAutoConfigBaseStationDatabase, BaseStation.AutoConfigBaseStationDatabase>(); factory.Register <IBackgroundDataDownloader, StandingData.BackgroundDataDownloader>(); factory.Register <IBaseStationDatabase, BaseStation.Database>(); factory.Register <ICallsignRouteFetcher, StandingData.CallsignRouteFetcher>(); factory.Register <ILogDatabase, Log.Database>(); factory.Register <IStandaloneAircraftOnlineLookupCache, AircraftOnlineLookupCache.StandaloneAircraftOnlineLookupCache>(); factory.Register <IStandingDataManager, StandingData.StandingDataManager>(); factory.Register <IStandingDataUpdater, StandingData.StandingDataUpdater>(); factory.Register <IUser, Users.User>(); factory.Register <IUserManager, Users.UserManager>(); }
/// <summary> /// Registers implementations. /// </summary> /// <param name="factory"></param> public static void Register(IClassFactory factory) { factory.Register <AWhewell.Owin.Interface.WebApi.IControllerFinder, ControllerFinder>(); factory.Register <AWhewell.Owin.Interface.WebApi.IModelBuilder, ModelBuilder>(); factory.Register <AWhewell.Owin.Interface.WebApi.IRouteCaller, RouteCaller>(); factory.Register <AWhewell.Owin.Interface.WebApi.IRouteFinder, RouteFinder>(); factory.Register <AWhewell.Owin.Interface.WebApi.IRouteMapper, RouteMapper>(); factory.Register <AWhewell.Owin.Interface.WebApi.IRouteFilter, RouteFilter>(); factory.Register <AWhewell.Owin.Interface.WebApi.ITypeFinder, TypeFinder>(); factory.Register <AWhewell.Owin.Interface.WebApi.IWebApiMiddleware, WebApiMiddleware>(); factory.Register <AWhewell.Owin.Interface.WebApi.IWebApiResponder, WebApiResponder>(); factory.Register <AWhewell.Owin.Interface.WebApi.IJsonSerialiser, JsonNetWrapper.JsonSerialiser>(); }
/// <summary> /// Initialises the class factory with all the standard implementations in this library. /// </summary> /// <param name="factory"></param> public static void Register(IClassFactory factory) { factory.Register <IAutoConfigWebServer, AutoConfigWebServer>(); factory.Register <IResponder, Responder>(); if (Type.GetType("Mono.Runtime") == null) { factory.Register <IUniversalPlugAndPlayManager, DotNetUniversalPlugAndPlayManager>(); } else { factory.Register <IUniversalPlugAndPlayManager, MonoUniversalPlugAndPlayManager>(); } }
/// <summary> /// Initialises the class factory with all the standard implementations in this library. /// </summary> /// <param name="factory"></param> public static void Register(IClassFactory factory) { factory.Register <IAircraftListJsonBuilder, AircraftListJsonBuilder>(); factory.Register <IBundler, Bundler>(); factory.Register <IHtmlLocaliser, HtmlLocaliser>(); factory.Register <IMinifier, Minifier>(); factory.Register <IWebAdminViewManager, WebAdminViewManagerStub>(); factory.Register <IWebSite, WebSite>(); factory.Register <IWebSiteProvider, WebSiteProvider>(); factory.Register <IWebSiteExtender, WebSiteExtender>(); factory.Register <IWebSiteGraphics, WebSiteGraphics>(); }
/// <summary> /// See interface docs. /// </summary> /// <param name="classFactory"></param> public void RegisterImplementations(IClassFactory classFactory) { Filter.Initialise(this); OriginalImplementationFactory.RecordCurrentImplementation <IListener>(); classFactory.Register <IListener, ListenerWrapper>(); }
/// <summary> /// See interface docs. /// </summary> /// <param name="classFactory"></param> public void RegisterImplementations(IClassFactory classFactory) { _WebAdminViewManager = (WebAdminViewManager)(new WebAdminViewManager().Singleton); _WebAdminViewManager.Initialise(ProtectedFolder); _WebAdminViewManager.RegisterTemplateFileName("@access-editor.html@", Path.GetFullPath(Path.Combine(PluginFolder, "Web/WebAdmin/templates/template-access-editor-block.html"))); _WebAdminViewManager.RegisterTemplateFileName("@head.html@", Path.GetFullPath(Path.Combine(PluginFolder, "Web/WebAdmin/templates/template-header-block.html"))); classFactory.Register <IWebAdminViewManager, WebAdminViewManager>(); }
public void ClassFactory_CreateChildFactory_Returns_Child_That_Can_Be_Modified_Independently_Of_Parent() { _ClassFactory.Register <IX, X>(); IClassFactory child = _ClassFactory.CreateChildFactory(); child.Register <IX, XX>(); Assert.IsInstanceOfType(_ClassFactory.Resolve <IX>(), typeof(X)); Assert.IsInstanceOfType(child.Resolve <IX>(), typeof(XX)); }
public static void Register(IClassFactory factory) { factory.Register <IWebServer, OwinWebServer>(); // A "do nothing" call that just makes sure that Microsoft.Owin.Host.HttpListener gets recognised by // the compiler and linker as a mandatory dependency of the project if (factory.GetType().IsAssignableFrom(typeof(Microsoft.Owin.Host.HttpListener.OwinHttpListener))) { throw new InvalidCastException("It will never get here but we need code that can't be optimised away"); } }
/// <summary> /// Initialises the class factory with all the standard implementations in this library. /// </summary> /// <param name="factory"></param> public static void Register(IClassFactory factory) { factory.Register<IAutoConfigBaseStationDatabase, BaseStation.AutoConfigBaseStationDatabase>(); factory.Register<IBackgroundDataDownloader, StandingData.BackgroundDataDownloader>(); factory.Register<IBaseStationDatabase, BaseStation.Database>(); factory.Register<ILogDatabase, Log.Database>(); factory.Register<IStandingDataManager, StandingData.StandingDataManager>(); factory.Register<IStandingDataUpdater, StandingData.StandingDataUpdater>(); }
/// <summary> /// Initialises the class factory with all the standard implementations in this library. /// </summary> /// <param name="factory"></param> public static void Register(IClassFactory factory) { factory.Register <IAutoConfigBaseStationDatabase, BaseStation.AutoConfigBaseStationDatabase>(); factory.Register <IBackgroundDataDownloader, StandingData.BackgroundDataDownloader>(); factory.Register <IBaseStationDatabase, BaseStation.Database>(); factory.Register <ILogDatabase, Log.Database>(); factory.Register <IStandingDataManager, StandingData.StandingDataManager>(); factory.Register <IStandingDataUpdater, StandingData.StandingDataUpdater>(); }
/// <summary> /// See interface docs. /// </summary> /// <param name="classFactory"></param> public void RegisterImplementations(IClassFactory classFactory) { classFactory.Register <IOptionsView, WinForms.OptionsView>(); classFactory.Register <IOptionsPresenter, OptionsPresenter>(); }
/// <summary> /// Initialises the class factory with all the standard implementations in this library. /// </summary> /// <param name="factory"></param> public static void Register(IClassFactory factory) { factory.Register <ISQLiteConnectionProvider, SQLiteConnectionProvider>(); factory.Register <ISQLiteConnectionStringBuilder, SQLiteConnectionStringBuilderWrapper>(); factory.Register <ISQLiteException, SQLiteExceptionWrapper>(); }
/// <summary> /// Registers implementations. /// </summary> /// <param name="factory"></param> public static void Register(IClassFactory factory) { factory.Register <AWhewell.Owin.Interface.Host.HttpListener.IHostHttpListener, HostHttpListener>(); factory.Register <AWhewell.Owin.Interface.Host.HttpListener.HttpListenerWrapper.IHttpListener, HttpListenerWrapper.HttpListener>(); }
public void ClassFactory_Register_Throws_If_InterfaceType_Is_Null() { _ClassFactory.Register(null, typeof(X)); }
/// <summary> /// Creates the static instance of the factory and registers the default instance of the class factory. /// </summary> static Factory() { _Singleton = new ClassFactory(); _Singleton.Register<IClassFactory, ClassFactory>(); }
/// <summary> /// Initialises the class factory with all the standard implementations in this library. /// </summary> /// <param name="factory"></param> public static void Register(IClassFactory factory) { factory.Register <IWebSite, WebSite>(); }
public void RegisterImplementations(IClassFactory classFactory) { classFactory.Register <IRebroadcastServer, RebroadcastServerStub>(); classFactory.Register <IRebroadcastServerManager, RebroadcastServerManagerStub>(); }
/// <summary> /// Initialises the class factory with all the standard implementations in this library. /// </summary> /// <param name="factory"></param> public static void Register(IClassFactory factory) { factory.Register<ISQLiteConnectionProvider, SQLiteConnectionProvider>(); factory.Register<ISQLiteConnectionStringBuilder, SQLiteConnectionStringBuilderWrapper>(); }
/// <summary> /// Initialises the class factory with all the standard implementations in this library. /// </summary> /// <param name="factory"></param> public static void Register(IClassFactory factory) { factory.Register <Interface.Owin.IAccessConfiguration, MiddlewareConfiguration.AccessConfiguration>(); factory.Register <Interface.Owin.IAccessFilter, Middleware.AccessFilter>(); factory.Register <Interface.Owin.IAudioServer, Middleware.AudioServer>(); factory.Register <Interface.Owin.IAuthenticationConfiguration, MiddlewareConfiguration.AuthenticationConfiguration>(); factory.Register <Interface.Owin.IAutoConfigCompressionManipulator, StreamManipulator.AutoConfigCompressionManipulator>(); factory.Register <Interface.Owin.IBasicAuthenticationFilter, Middleware.BasicAuthenticationFilter>(); factory.Register <Interface.Owin.IBundlerConfiguration, MiddlewareConfiguration.BundlerConfiguration>(); factory.Register <Interface.Owin.IBundlerHtmlManipulator, StreamManipulator.BundlerHtmlManipulator>(); factory.Register <Interface.Owin.IBundlerServer, Middleware.BundlerServer>(); factory.Register <Interface.Owin.ICorsHandler, Middleware.CorsHandler>(); factory.Register <Interface.Owin.IFileSystemServer, Middleware.FileSystemServer>(); factory.Register <Interface.Owin.IFileSystemServerConfiguration, MiddlewareConfiguration.FileSystemServerConfiguration>(); factory.Register <Interface.Owin.IHtmlManipulator, StreamManipulator.HtmlManipulator>(); factory.Register <Interface.Owin.IHtmlManipulatorConfiguration, MiddlewareConfiguration.HtmlManipulatorConfiguration>(); factory.Register <Interface.Owin.IImageServer, Middleware.ImageServer>(); factory.Register <Interface.Owin.IImageServerConfiguration, MiddlewareConfiguration.ImageServerConfiguration>(); factory.Register <Interface.Owin.ILoopbackHost, LoopbackHost>(); factory.Register <Interface.Owin.IJavascriptManipulator, StreamManipulator.JavascriptManipulator>(); factory.Register <Interface.Owin.IJavascriptManipulatorConfiguration, MiddlewareConfiguration.JavascriptManipulatorConfiguration>(); factory.Register <Interface.Owin.IMapPluginHtmlManipulator, StreamManipulator.MapPluginHtmlManipulator>(); factory.Register <Interface.Owin.IRedirectionConfiguration, MiddlewareConfiguration.RedirectionConfiguration>(); factory.Register <Interface.Owin.IRedirectionFilter, Middleware.RedirectionFilter>(); factory.Register <IAircraftListJsonBuilder, AircraftListJsonBuilder>(); factory.Register <IHtmlLocaliser, HtmlLocaliser>(); factory.Register <IMinifier, Minifier>(); factory.Register <IWebAdminViewManager, WebAdminViewManagerStub>(); factory.Register <IWebSite, WebSite>(); factory.Register <IWebSiteExtender, WebSiteExtender>(); factory.Register <IWebSiteGraphics, WebSiteGraphics>(); factory.Register <IWebSitePipelineBuilder, WebSitePipelineBuilder>(); AWhewell.Owin.Implementations.Register(factory); AWhewell.Owin.WebApi.Implementations.Register(factory); }
public void RegisterImplementations(IClassFactory classFactory) { classFactory.Register <IAirportDataDotCom, AirportDataDotCom>(); }
/// <summary> /// Registers implementations. /// </summary> /// <param name="factory"></param> public static void Register(IClassFactory factory) { factory.Register<AWhewell.Owin.Interface.Host.Ram.IHostRam, HostRam>(); }
public static void Register(IClassFactory factory) { factory.Register <IWebServer, OwinWebServer>(); AWhewell.Owin.Host.HttpListener.Implementations.Register(factory); }
/// <summary> /// Initialises the class factory with all the standard implementations in this library. /// </summary> /// <param name="factory"></param> public static void Register(IClassFactory factory) { factory.Register <VirtualRadar.Interface.Adsb.IAdsbTranslator, Adsb.AdsbTranslator>(); factory.Register <VirtualRadar.Interface.Adsb.ICompactPositionReporting, Adsb.CompactPositionReporting>(); factory.Register <VirtualRadar.Interface.BaseStation.IBaseStationAircraftList, BaseStation.BaseStationAircraftList>(); factory.Register <VirtualRadar.Interface.BaseStation.IBaseStationMessageCompressor, BaseStation.BaseStationMessageCompressor>(); factory.Register <VirtualRadar.Interface.BaseStation.IBaseStationMessageTranslator, BaseStation.BaseStationMessageTranslator>(); factory.Register <VirtualRadar.Interface.BaseStation.IRawMessageTranslator, BaseStation.RawMessageTranslator>(); factory.Register <VirtualRadar.Interface.FlightSimulatorX.IFlightSimulatorX, FlightSimulatorX.FlightSimulatorX>(); factory.Register <VirtualRadar.Interface.Listener.IAutoConfigListener, Listener.AutoConfigListener>(); factory.Register <VirtualRadar.Interface.Listener.IBeastMessageBytesExtractor, Listener.BeastMessageBytesExtractor>(); factory.Register <VirtualRadar.Interface.Listener.IListener, Listener.Listener>(); factory.Register <VirtualRadar.Interface.Listener.IPort30003MessageBytesExtractor, Listener.Port30003MessageBytesExtractor>(); factory.Register <VirtualRadar.Interface.Listener.ISbs3MessageBytesExtractor, Listener.Sbs3MessageBytesExtractor>(); factory.Register <VirtualRadar.Interface.Listener.ISerialListenerProvider, Listener.SerialListenerProvider>(); factory.Register <VirtualRadar.Interface.Listener.ITcpListenerProvider, Listener.TcpListenerProvider>(); factory.Register <VirtualRadar.Interface.ModeS.IModeSParity, ModeS.ModeSParity>(); factory.Register <VirtualRadar.Interface.ModeS.IModeSTranslator, ModeS.ModeSTranslator>(); factory.Register <VirtualRadar.Interface.Presenter.IAboutPresenter, Presenter.AboutPresenter>(); factory.Register <VirtualRadar.Interface.Presenter.IConnectionClientLogPresenter, Presenter.ConnectionClientLogPresenter>(); factory.Register <VirtualRadar.Interface.Presenter.IConnectionSessionLogPresenter, Presenter.ConnectionSessionLogPresenter>(); factory.Register <VirtualRadar.Interface.Presenter.IDownloadDataPresenter, Presenter.DownloadDataPresenter>(); factory.Register <VirtualRadar.Interface.Presenter.IFlightSimulatorXPresenter, Presenter.FlightSimulatorXPresenter>(); factory.Register <VirtualRadar.Interface.Presenter.IInvalidPluginsPresenter, Presenter.InvalidPluginsPresenter>(); factory.Register <VirtualRadar.Interface.Presenter.IMainPresenter, Presenter.MainPresenter>(); factory.Register <VirtualRadar.Interface.Presenter.IOptionsPresenter, Presenter.OptionsPresenter>(); factory.Register <VirtualRadar.Interface.Presenter.IPluginsPresenter, Presenter.PluginsPresenter>(); factory.Register <VirtualRadar.Interface.Presenter.IRebroadcastOptionsPresenter, Presenter.RebroadcastOptionsPresenter>(); factory.Register <VirtualRadar.Interface.Presenter.IReceiverLocationsPresenter, Presenter.ReceiverLocationsPresenter>(); factory.Register <VirtualRadar.Interface.Presenter.IShutdownPresenter, Presenter.ShutdownPresenter>(); factory.Register <VirtualRadar.Interface.Presenter.ISplashPresenter, Presenter.SplashPresenter>(); factory.Register <VirtualRadar.Interface.Presenter.IStatisticsPresenter, Presenter.StatisticsPresenter>(); factory.Register <VirtualRadar.Interface.Settings.IConfigurationStorage, Settings.ConfigurationStorage>(); factory.Register <VirtualRadar.Interface.Settings.IInstallerSettingsStorage, Settings.InstallerSettingsStorage>(); factory.Register <VirtualRadar.Interface.Settings.IPluginManifestStorage, Settings.PluginManifestStorage>(); factory.Register <VirtualRadar.Interface.Settings.IPluginSettingsStorage, Settings.PluginSettingsStorage>(); factory.Register <IAircraft, Aircraft>(); factory.Register <IAircraftComparer, AircraftComparer>(); factory.Register <IAircraftPictureManager, AircraftPictureManager>(); factory.Register <IAudio, Audio>(); factory.Register <IAutoConfigPictureFolderCache, AutoConfigPictureFolderCache>(); factory.Register <IBackgroundWorker, BackgroundWorker>(); factory.Register <IBitStream, BitStream>(); factory.Register <IBroadcastProvider, BroadcastProvider>(); factory.Register <IConnectionLogger, ConnectionLogger>(); factory.Register <IDirectoryCache, DirectoryCache>(); factory.Register <IExternalIPAddressService, ExternalIPAddressService>(); factory.Register <IHeartbeatService, HeartbeatService>(); factory.Register <IImageFileManager, ParallelAccessImageFileManager>(); factory.Register <ILog, Log>(); factory.Register <INewVersionChecker, NewVersionChecker>(); factory.Register <IPluginManager, PluginManager>(); factory.Register <IRebroadcastServer, RebroadcastServer>(); factory.Register <IRebroadcastServerManager, RebroadcastServerManager>(); factory.Register <IRuntimeEnvironment, RuntimeEnvironment>(); factory.Register <ISimpleAircraftList, SimpleAircraftList>(); factory.Register <IStatistics, Statistics>(); if (Type.GetType("Mono.Runtime") == null) { factory.Register <ISpeechSynthesizerWrapper, DotNetSpeechSynthesizerWrapper>(); factory.Register <VirtualRadar.Interface.FlightSimulatorX.ISimConnectWrapper, FlightSimulatorX.DotNetSimConnectWrapper>(); } else { factory.Register <ISpeechSynthesizerWrapper, MonoSpeechSynthesizerWrapper>(); factory.Register <VirtualRadar.Interface.FlightSimulatorX.ISimConnectWrapper, FlightSimulatorX.MonoSimConnectWrapper>(); } }
/// <summary> /// Initialises the class factory with all the standard implementations in this library. /// </summary> /// <param name="factory"></param> public static void Register(IClassFactory factory) { factory.Register<IWebSite, WebSite>(); }
/// <summary> /// Registers implementations of interfaces. /// </summary> /// <param name="factory"></param> public static void Register(IClassFactory factory) { factory.Register <Interface.Owin.IAccessConfiguration, Configuration.AccessConfiguration>(); factory.Register <Interface.Owin.IAuthenticationConfiguration, Configuration.AuthenticationConfiguration>(); factory.Register <Interface.Owin.IBundlerConfiguration, Configuration.BundlerConfiguration>(); factory.Register <Interface.Owin.IFileSystemServerConfiguration, Configuration.FileSystemServerConfiguration>(); factory.Register <Interface.Owin.IHtmlManipulatorConfiguration, Configuration.HtmlManipulatorConfiguration>(); factory.Register <Interface.Owin.IJavascriptManipulatorConfiguration, Configuration.JavascriptManipulatorConfiguration>(); factory.Register <Interface.Owin.IImageServerConfiguration, Configuration.ImageServerConfiguration>(); factory.Register <Interface.Owin.IPipelineConfiguration, Configuration.PipelineConfiguration>(); factory.Register <Interface.Owin.IRedirectionConfiguration, Configuration.RedirectionConfiguration>(); factory.Register <Interface.Owin.IWebAppConfiguration, Configuration.WebAppConfiguration>(); factory.Register <Interface.Owin.IAccessFilter, Middleware.AccessFilter>(); factory.Register <Interface.Owin.IAudioServer, Middleware.AudioServer>(); factory.Register <Interface.Owin.IBundlerServer, Middleware.BundlerServer>(); factory.Register <Interface.Owin.IBasicAuthenticationFilter, Middleware.BasicAuthenticationFilter>(); factory.Register <Interface.Owin.IBasicAuthenticationWebApiMessageHandler, Middleware.BasicAuthenticationWebApiMessageHandler>(); factory.Register <Interface.Owin.ICorsHandler, Middleware.CorsHandler>(); factory.Register <Interface.Owin.IExceptionHandler, Middleware.ExceptionHandler>(); factory.Register <Interface.Owin.IFileSystemServer, Middleware.FileSystemServer>(); factory.Register <Interface.Owin.IImageServer, Middleware.ImageServer>(); factory.Register <Interface.Owin.IRedirectionFilter, Middleware.RedirectionFilter>(); factory.Register <Interface.Owin.IResponseStreamWrapper, Middleware.ResponseStreamWrapper>(); factory.Register <Interface.Owin.IBundlerHtmlManipulator, StreamManipulator.BundlerHtmlManipulator>(); factory.Register <Interface.Owin.IHtmlManipulator, StreamManipulator.HtmlManipulator>(); factory.Register <Interface.Owin.IJavascriptManipulator, StreamManipulator.JavascriptManipulator>(); factory.Register <Interface.Owin.IMapPluginHtmlManipulator, StreamManipulator.MapPluginHtmlManipulator>(); factory.Register <Interface.Owin.ILoopbackHost, LoopbackHost>(); factory.Register <Interface.Owin.IStandardPipeline, StandardPipeline>(); }
/// <summary> /// Initialises the class factory with all the standard implementations in this library. /// </summary> /// <param name="factory"></param> public static void Register(IClassFactory factory) { factory.Register <VirtualRadar.Interface.Adsb.IAdsbTranslator, Adsb.AdsbTranslator>(); factory.Register <VirtualRadar.Interface.Adsb.ICompactPositionReporting, Adsb.CompactPositionReporting>(); factory.Register <VirtualRadar.Interface.BaseStation.IBaseStationAircraftList, BaseStation.BaseStationAircraftList>(); factory.Register <VirtualRadar.Interface.BaseStation.IBaseStationMessageCompressor, BaseStation.BaseStationMessageCompressor>(); factory.Register <VirtualRadar.Interface.BaseStation.IBaseStationMessageTranslator, BaseStation.BaseStationMessageTranslator>(); factory.Register <VirtualRadar.Interface.BaseStation.IRawMessageTranslator, BaseStation.RawMessageTranslator>(); factory.Register <VirtualRadar.Interface.FlightSimulatorX.IFlightSimulatorX, FlightSimulatorX.FlightSimulatorX>(); factory.Register <VirtualRadar.Interface.Listener.IAircraftListJsonMessageBytesExtractor, Listener.AircraftListJsonMessageBytesExtractor>(); factory.Register <VirtualRadar.Interface.Listener.IAircraftListJsonMessageConverter, Listener.AircraftListJsonMessageConverter>(); factory.Register <VirtualRadar.Interface.Listener.IBeastMessageBytesExtractor, Listener.BeastMessageBytesExtractor>(); factory.Register <VirtualRadar.Interface.Listener.ICompressedMessageBytesExtractor, Listener.CompressedMessageBytesExtractor>(); factory.Register <VirtualRadar.Interface.Listener.IFeed, Listener.Feed>(); factory.Register <VirtualRadar.Interface.Listener.IFeedManager, Listener.FeedManager>(); factory.Register <VirtualRadar.Interface.Listener.IListener, Listener.Listener>(); factory.Register <VirtualRadar.Interface.Listener.IMergedFeedComponentListener, Listener.MergedFeedComponentListener>(); factory.Register <VirtualRadar.Interface.Listener.IMergedFeedListener, Listener.MergedFeedListener>(); factory.Register <VirtualRadar.Interface.Listener.IPlaneFinderMessageBytesExtractor, Listener.PlaneFinderMessageBytesExtractor>(); factory.Register <VirtualRadar.Interface.Listener.IPolarPlotter, Listener.PolarPlotter>(); factory.Register <VirtualRadar.Interface.Listener.IPort30003MessageBytesExtractor, Listener.Port30003MessageBytesExtractor>(); factory.Register <VirtualRadar.Interface.Listener.IReceiverFormatManager, Listener.ReceiverFormatManager>(); factory.Register <VirtualRadar.Interface.Listener.ISbs3MessageBytesExtractor, Listener.Sbs3MessageBytesExtractor>(); factory.Register <VirtualRadar.Interface.ModeS.IModeSParity, ModeS.ModeSParity>(); factory.Register <VirtualRadar.Interface.ModeS.IModeSTranslator, ModeS.ModeSTranslator>(); factory.Register <VirtualRadar.Interface.Network.IConnectorActivityLog, Network.ConnectorActivityLog>(); factory.Register <VirtualRadar.Interface.Network.IConnectorSnapshotLogger, Network.ConnectorSnapshotLogger>(); factory.Register <VirtualRadar.Interface.Network.INetworkConnector, Network.NetworkConnector>(); factory.Register <VirtualRadar.Interface.Network.IPassphraseAuthentication, Network.PassphraseAuthentication>(); factory.Register <VirtualRadar.Interface.Network.IRebroadcastFormatManager, Network.RebroadcastFormatManager>(); factory.Register <VirtualRadar.Interface.Network.IRebroadcastServer, Network.RebroadcastServer>(); factory.Register <VirtualRadar.Interface.Network.IRebroadcastServerManager, Network.RebroadcastServerManager>(); factory.Register <VirtualRadar.Interface.Network.ISerialConnector, Network.SerialConnector>(); factory.Register <VirtualRadar.Interface.Network.ITcpConnectionStateService, Network.TcpConnectionStateService>(); factory.Register <VirtualRadar.Interface.Presenter.IAboutPresenter, Presenter.AboutPresenter>(); factory.Register <VirtualRadar.Interface.Presenter.IAircraftOnlineLookupLogPresenter, Presenter.AircraftOnlineLookupLogPresenter>(); factory.Register <VirtualRadar.Interface.Presenter.IBackgroundThreadQueuesPresenter, Presenter.BackgroundThreadQueuesPresenter>(); factory.Register <VirtualRadar.Interface.Presenter.ICidrEditPresenter, Presenter.CidrEditPresenter>(); factory.Register <VirtualRadar.Interface.Presenter.IConnectionClientLogPresenter, Presenter.ConnectionClientLogPresenter>(); factory.Register <VirtualRadar.Interface.Presenter.IConnectionSessionLogPresenter, Presenter.ConnectionSessionLogPresenter>(); factory.Register <VirtualRadar.Interface.Presenter.IConnectorActivityLogPresenter, Presenter.ConnectorActivityLogPresenter>(); factory.Register <VirtualRadar.Interface.Presenter.IDownloadDataPresenter, Presenter.DownloadDataPresenter>(); factory.Register <VirtualRadar.Interface.Presenter.IFlightSimulatorXPresenter, Presenter.FlightSimulatorXPresenter>(); factory.Register <VirtualRadar.Interface.Presenter.IInvalidPluginsPresenter, Presenter.InvalidPluginsPresenter>(); factory.Register <VirtualRadar.Interface.Presenter.IMainPresenter, Presenter.MainPresenter>(); factory.Register <VirtualRadar.Interface.Presenter.IPluginsPresenter, Presenter.PluginsPresenter>(); factory.Register <VirtualRadar.Interface.Presenter.ISettingsPresenter, Presenter.SettingsPresenter>(); factory.Register <VirtualRadar.Interface.Presenter.IShutdownPresenter, Presenter.ShutdownPresenter>(); factory.Register <VirtualRadar.Interface.Presenter.ISplashPresenter, Presenter.SplashPresenter>(); factory.Register <VirtualRadar.Interface.Presenter.IStatisticsPresenter, Presenter.StatisticsPresenter>(); factory.Register <VirtualRadar.Interface.Settings.IConfigurationListener, Settings.ConfigurationListener>(); factory.Register <VirtualRadar.Interface.Settings.IConfigurationStorage, Settings.ConfigurationStorage>(); factory.Register <VirtualRadar.Interface.Settings.IInstallerSettingsStorage, Settings.InstallerSettingsStorage>(); factory.Register <VirtualRadar.Interface.Settings.IPluginManifestStorage, Settings.PluginManifestStorage>(); factory.Register <VirtualRadar.Interface.Settings.IPluginSettingsStorage, Settings.PluginSettingsStorage>(); factory.Register <VirtualRadar.Interface.Settings.ISavedPolarPlotStorage, Settings.SavedPolarPlotStorage>(); factory.Register <VirtualRadar.Interface.Settings.ISharedConfiguration, Settings.SharedConfiguration>(); factory.Register <VirtualRadar.Interface.Settings.ISiteSettingsParser, Settings.SiteSettingsParser>(); factory.Register <VirtualRadar.Interface.Settings.IUserCache, Settings.UserCache>(); factory.Register <IAccessFilter, AccessFilter>(); factory.Register <IAircraft, Aircraft>(); factory.Register <IAircraftComparer, AircraftComparer>(); factory.Register <IAircraftDetailFetcher, AircraftDetailFetcher>(); factory.Register <IAircraftOnlineLookup, AircraftOnlineLookup>(); factory.Register <IAircraftOnlineLookupLog, AircraftOnlineLookupLog>(); factory.Register <IAircraftOnlineLookupManager, AircraftOnlineLookupManager>(); factory.Register <IAircraftOnlineLookupProvider, AircraftOnlineLookupProvider>(); factory.Register <IAircraftPictureManager, AircraftPictureManager>(); factory.Register <IAircraftSanityChecker, AircraftSanityChecker>(); factory.Register <IAirportDataDotCom, AirportDataDotCom>(); factory.Register <IAirPressureDownloader, AirPressureDownloader>(); factory.Register <IAirPressureLookup, AirPressureLookup>(); factory.Register <IAirPressureManager, AirPressureManager>(); factory.Register <IAudio, Audio>(); factory.Register <IAutoConfigPictureFolderCache, AutoConfigPictureFolderCache>(); factory.Register <IBackgroundWorker, BackgroundWorker>(); factory.Register <IBitStream, BitStream>(); factory.Register <ICallsignParser, CallsignParser>(); factory.Register <IClock, Clock>(); factory.Register <IConnectionLogger, ConnectionLogger>(); factory.Register <IConsole, ConsoleWrapper>(); factory.Register <IDirectoryCache, DirectoryCache>(); factory.Register <IExceptionReporter, ExceptionReporter>(); factory.Register <IExternalIPAddressService, ExternalIPAddressService>(); factory.Register <IFileSystemProvider, FileSystemProvider>(); factory.Register <IFileSystemWatcher, FileSystemWatcherWrapper>(); factory.Register <IFlightSimulatorAircraftList, FlightSimulatorAircraftList>(); factory.Register <IHeartbeatService, HeartbeatService>(); factory.Register <IImageDimensionsFetcher, ImageDimensionsFetcher>(); factory.Register <IImageFileManager, ParallelAccessImageFileManager>(); factory.Register <ILog, Log>(); factory.Register <INewVersionChecker, NewVersionChecker>(); factory.Register <IPluginManager, PluginManager>(); factory.Register <IRuntimeEnvironment, RuntimeEnvironment>(); factory.Register <ISimpleAircraftList, SimpleAircraftList>(); factory.Register <IStatistics, Statistics>(); factory.Register <ITimer, Timer>(); factory.Register <IXmlSerialiser, XmlSerialiser>(); if (Type.GetType("Mono.Runtime") == null) { factory.Register <IShutdownSignalHandler, DotNetShutdownSignalHandler>(); factory.Register <ISpeechSynthesizerWrapper, DotNetSpeechSynthesizerWrapper>(); factory.Register <VirtualRadar.Interface.FlightSimulatorX.ISimConnectWrapper, FlightSimulatorX.DotNetSimConnectWrapper>(); } else { factory.Register <IShutdownSignalHandler, MonoShutdownSignalHandler>(); factory.Register <ISpeechSynthesizerWrapper, MonoSpeechSynthesizerWrapper>(); factory.Register <VirtualRadar.Interface.FlightSimulatorX.ISimConnectWrapper, FlightSimulatorX.MonoSimConnectWrapper>(); } }
/// <summary> /// Creates the static instance of the factory and registers the default instance of the class factory. /// </summary> static Factory() { _Singleton = new ClassFactory(); _Singleton.Register <IClassFactory, ClassFactory>(); }
/// <summary> /// Initialises the class factory with all the standard implementations in this library. /// </summary> /// <param name="factory"></param> public static void Register(IClassFactory factory) { factory.Register<VirtualRadar.Interface.Adsb.IAdsbTranslator, Adsb.AdsbTranslator>(); factory.Register<VirtualRadar.Interface.Adsb.ICompactPositionReporting, Adsb.CompactPositionReporting>(); factory.Register<VirtualRadar.Interface.BaseStation.IBaseStationAircraftList, BaseStation.BaseStationAircraftList>(); factory.Register<VirtualRadar.Interface.BaseStation.IBaseStationMessageCompressor, BaseStation.BaseStationMessageCompressor>(); factory.Register<VirtualRadar.Interface.BaseStation.IBaseStationMessageTranslator, BaseStation.BaseStationMessageTranslator>(); factory.Register<VirtualRadar.Interface.BaseStation.IRawMessageTranslator, BaseStation.RawMessageTranslator>(); factory.Register<VirtualRadar.Interface.FlightSimulatorX.IFlightSimulatorX, FlightSimulatorX.FlightSimulatorX>(); factory.Register<VirtualRadar.Interface.Listener.IAutoConfigListener, Listener.AutoConfigListener>(); factory.Register<VirtualRadar.Interface.Listener.IBeastMessageBytesExtractor, Listener.BeastMessageBytesExtractor>(); factory.Register<VirtualRadar.Interface.Listener.IListener, Listener.Listener>(); factory.Register<VirtualRadar.Interface.Listener.IPort30003MessageBytesExtractor, Listener.Port30003MessageBytesExtractor>(); factory.Register<VirtualRadar.Interface.Listener.ISbs3MessageBytesExtractor, Listener.Sbs3MessageBytesExtractor>(); factory.Register<VirtualRadar.Interface.Listener.ISerialListenerProvider, Listener.SerialListenerProvider>(); factory.Register<VirtualRadar.Interface.Listener.ITcpListenerProvider, Listener.TcpListenerProvider>(); factory.Register<VirtualRadar.Interface.ModeS.IModeSParity, ModeS.ModeSParity>(); factory.Register<VirtualRadar.Interface.ModeS.IModeSTranslator, ModeS.ModeSTranslator>(); factory.Register<VirtualRadar.Interface.Presenter.IAboutPresenter, Presenter.AboutPresenter>(); factory.Register<VirtualRadar.Interface.Presenter.IConnectionClientLogPresenter, Presenter.ConnectionClientLogPresenter>(); factory.Register<VirtualRadar.Interface.Presenter.IConnectionSessionLogPresenter, Presenter.ConnectionSessionLogPresenter>(); factory.Register<VirtualRadar.Interface.Presenter.IDownloadDataPresenter, Presenter.DownloadDataPresenter>(); factory.Register<VirtualRadar.Interface.Presenter.IFlightSimulatorXPresenter, Presenter.FlightSimulatorXPresenter>(); factory.Register<VirtualRadar.Interface.Presenter.IInvalidPluginsPresenter, Presenter.InvalidPluginsPresenter>(); factory.Register<VirtualRadar.Interface.Presenter.IMainPresenter, Presenter.MainPresenter>(); factory.Register<VirtualRadar.Interface.Presenter.IOptionsPresenter, Presenter.OptionsPresenter>(); factory.Register<VirtualRadar.Interface.Presenter.IPluginsPresenter, Presenter.PluginsPresenter>(); factory.Register<VirtualRadar.Interface.Presenter.IRebroadcastOptionsPresenter, Presenter.RebroadcastOptionsPresenter>(); factory.Register<VirtualRadar.Interface.Presenter.IReceiverLocationsPresenter, Presenter.ReceiverLocationsPresenter>(); factory.Register<VirtualRadar.Interface.Presenter.IShutdownPresenter, Presenter.ShutdownPresenter>(); factory.Register<VirtualRadar.Interface.Presenter.ISplashPresenter, Presenter.SplashPresenter>(); factory.Register<VirtualRadar.Interface.Presenter.IStatisticsPresenter, Presenter.StatisticsPresenter>(); factory.Register<VirtualRadar.Interface.Settings.IConfigurationStorage, Settings.ConfigurationStorage>(); factory.Register<VirtualRadar.Interface.Settings.IInstallerSettingsStorage, Settings.InstallerSettingsStorage>(); factory.Register<VirtualRadar.Interface.Settings.IPluginManifestStorage, Settings.PluginManifestStorage>(); factory.Register<VirtualRadar.Interface.Settings.IPluginSettingsStorage, Settings.PluginSettingsStorage>(); factory.Register<IAircraft, Aircraft>(); factory.Register<IAircraftComparer, AircraftComparer>(); factory.Register<IAircraftPictureManager, AircraftPictureManager>(); factory.Register<IAudio, Audio>(); factory.Register<IAutoConfigPictureFolderCache, AutoConfigPictureFolderCache>(); factory.Register<IBackgroundWorker, BackgroundWorker>(); factory.Register<IBitStream, BitStream>(); factory.Register<IBroadcastProvider, BroadcastProvider>(); factory.Register<IConnectionLogger, ConnectionLogger>(); factory.Register<IDirectoryCache, DirectoryCache>(); factory.Register<IExternalIPAddressService, ExternalIPAddressService>(); factory.Register<IHeartbeatService, HeartbeatService>(); factory.Register<IImageFileManager, ParallelAccessImageFileManager>(); factory.Register<ILog, Log>(); factory.Register<INewVersionChecker, NewVersionChecker>(); factory.Register<IPluginManager, PluginManager>(); factory.Register<IRebroadcastServer, RebroadcastServer>(); factory.Register<IRebroadcastServerManager, RebroadcastServerManager>(); factory.Register<IRuntimeEnvironment, RuntimeEnvironment>(); factory.Register<ISimpleAircraftList, SimpleAircraftList>(); factory.Register<IStatistics, Statistics>(); if(Type.GetType("Mono.Runtime") == null) { factory.Register<ISpeechSynthesizerWrapper, DotNetSpeechSynthesizerWrapper>(); factory.Register<VirtualRadar.Interface.FlightSimulatorX.ISimConnectWrapper, FlightSimulatorX.DotNetSimConnectWrapper>(); } else { factory.Register<ISpeechSynthesizerWrapper, MonoSpeechSynthesizerWrapper>(); factory.Register<VirtualRadar.Interface.FlightSimulatorX.ISimConnectWrapper, FlightSimulatorX.MonoSimConnectWrapper>(); } }