Beispiel #1
0
        /// <summary>
        /// Registers all the types into the <see cref="IoCManager"/> with <see cref="IoCManager.Register{TInterface, TImplementation}"/>
        /// </summary>
        internal static void RegisterIoC()
        {
            SharedIoC.RegisterIoC();

            IoCManager.Register <IBaseServer, BaseServer>();
            IoCManager.Register <IBaseServerInternal, BaseServer>();
            IoCManager.Register <IComponentFactory, ServerComponentFactory>();
            IoCManager.Register <IConGroupController, ConGroupController>();
            IoCManager.Register <IConsoleShell, ConsoleShell>();
            IoCManager.Register <IEntityManager, ServerEntityManager>();
            IoCManager.Register <IEntityNetworkManager, ServerEntityNetworkManager>();
            IoCManager.Register <IMapLoader, MapLoader>();
            IoCManager.Register <IPauseManager, PauseManager>();
            IoCManager.Register <IPlacementManager, PlacementManager>();
            IoCManager.Register <IPlayerManager, PlayerManager>();
            IoCManager.Register <IPrototypeManager, ServerPrototypeManager>();
            IoCManager.Register <IReflectionManager, ServerReflectionManager>();
            IoCManager.Register <IResourceManager, ResourceManager>();
            IoCManager.Register <IResourceManagerInternal, ResourceManager>();
            IoCManager.Register <IServerEntityManager, ServerEntityManager>();
            IoCManager.Register <IServerEntityManagerInternal, ServerEntityManager>();
            IoCManager.Register <IServerGameStateManager, ServerGameStateManager>();
            IoCManager.Register <IServerNetManager, NetManager>();
            IoCManager.Register <ISignalHandler, ServerSignalHandler>();
            IoCManager.Register <IStatusHost, StatusHost>();
            IoCManager.Register <ISystemConsoleManager, SystemConsoleManager>();
            IoCManager.Register <ITileDefinitionManager, TileDefinitionManager>();
            IoCManager.Register <IViewVariablesHost, ViewVariablesHost>();
        }
Beispiel #2
0
        /// <summary>
        /// Registers all the types into the <see cref="IoCManager"/> with <see cref="IoCManager.Register{TInterface, TImplementation}"/>
        /// </summary>
        internal static void RegisterIoC()
        {
            SharedIoC.RegisterIoC();

            IoCManager.Register <IBaseServer, BaseServer>();
            IoCManager.Register <IBaseServerInternal, BaseServer>();
            IoCManager.Register <IComponentFactory, ServerComponentFactory>();
            IoCManager.Register <IConGroupController, ConGroupController>();
            IoCManager.Register <IServerConsoleHost, ServerConsoleHost>();
            IoCManager.Register <IConsoleHost, ServerConsoleHost>();
            IoCManager.Register <IEntityManager, ServerEntityManager>();
            IoCManager.Register <IEntityNetworkManager, ServerEntityNetworkManager>();
            IoCManager.Register <IServerEntityNetworkManager, ServerEntityNetworkManager>();
            IoCManager.Register <IMapLoader, MapLoader>();
            IoCManager.Register <IPlacementManager, PlacementManager>();
            IoCManager.Register <IPlayerManager, PlayerManager>();
            IoCManager.Register <IPrototypeManager, ServerPrototypeManager>();
            IoCManager.Register <IReflectionManager, ServerReflectionManager>();
            IoCManager.Register <IResourceManager, ResourceManager>();
            IoCManager.Register <IResourceManagerInternal, ResourceManager>();
            IoCManager.Register <IServerEntityManager, ServerEntityManager>();
            IoCManager.Register <IServerEntityManagerInternal, ServerEntityManager>();
            IoCManager.Register <IServerGameStateManager, ServerGameStateManager>();
            IoCManager.Register <IServerNetManager, NetManager>();
            IoCManager.Register <IStatusHost, StatusHost>();
            IoCManager.Register <ISystemConsoleManager, SystemConsoleManager>();
            IoCManager.Register <ITileDefinitionManager, TileDefinitionManager>();
            IoCManager.Register <IViewVariablesHost, ViewVariablesHost>();
            IoCManager.Register <IDebugDrawingManager, DebugDrawingManager>();
            IoCManager.Register <IWatchdogApi, WatchdogApi>();
            IoCManager.Register <IScriptHost, ScriptHost>();
            IoCManager.Register <IMetricsManager, MetricsManager>();
            IoCManager.Register <IAuthManager, AuthManager>();
        }
Beispiel #3
0
        public static void RegisterIoC(GameController.DisplayMode mode)
        {
            SharedIoC.RegisterIoC();

            IoCManager.Register <IGameTiming, ClientGameTiming>();
            IoCManager.Register <IClientGameTiming, ClientGameTiming>();
            IoCManager.Register <IPrototypeManager, ClientPrototypeManager>();
            IoCManager.Register <IMapManager, ClientMapManager>();
            IoCManager.Register <IMapManagerInternal, ClientMapManager>();
            IoCManager.Register <IClientMapManager, ClientMapManager>();
            IoCManager.Register <IEntityManager, ClientEntityManager>();
            IoCManager.Register <IEntityLookup, EntityLookup>();
            IoCManager.Register <IReflectionManager, ClientReflectionManager>();
            IoCManager.Register <IConsoleHost, ClientConsoleHost>();
            IoCManager.Register <IClientConsoleHost, ClientConsoleHost>();
            IoCManager.Register <IComponentFactory, ClientComponentFactory>();
            IoCManager.Register <ITileDefinitionManager, ClydeTileDefinitionManager>();
            IoCManager.Register <IClydeTileDefinitionManager, ClydeTileDefinitionManager>();
            IoCManager.Register <GameController, GameController>();
            IoCManager.Register <IGameController, GameController>();
            IoCManager.Register <IGameControllerInternal, GameController>();
            IoCManager.Register <IResourceManager, ResourceCache>();
            IoCManager.Register <IResourceManagerInternal, ResourceCache>();
            IoCManager.Register <IResourceCache, ResourceCache>();
            IoCManager.Register <IResourceCacheInternal, ResourceCache>();
            IoCManager.Register <IClientNetManager, NetManager>();
            IoCManager.Register <IClientEntityManager, ClientEntityManager>();
            IoCManager.Register <IClientEntityManagerInternal, ClientEntityManager>();
            IoCManager.Register <IEntityNetworkManager, ClientEntityManager>();
            IoCManager.Register <IClientGameStateManager, ClientGameStateManager>();
            IoCManager.Register <IBaseClient, BaseClient>();
            IoCManager.Register <IPlayerManager, PlayerManager>();
            IoCManager.Register <ISharedPlayerManager, PlayerManager>();
            IoCManager.Register <IStateManager, StateManager>();
            IoCManager.Register <IUserInterfaceManager, UserInterfaceManager>();
            IoCManager.Register <IUserInterfaceManagerInternal, UserInterfaceManager>();
            IoCManager.Register <IDebugDrawing, DebugDrawing>();
            IoCManager.Register <IDebugDrawingManager, DebugDrawingManager>();
            IoCManager.Register <ILightManager, LightManager>();
            IoCManager.Register <IDiscordRichPresence, DiscordRichPresence>();
            IoCManager.Register <IMidiManager, MidiManager>();
            IoCManager.Register <IAuthManager, AuthManager>();
            switch (mode)
            {
            case GameController.DisplayMode.Headless:
                IoCManager.Register <IClyde, ClydeHeadless>();
                IoCManager.Register <IClipboardManager, ClydeHeadless>();
                IoCManager.Register <IClydeAudio, ClydeHeadless>();
                IoCManager.Register <IClydeInternal, ClydeHeadless>();
                IoCManager.Register <IInputManager, InputManager>();
                IoCManager.Register <IFileDialogManager, DummyFileDialogManager>();
                IoCManager.Register <IUriOpener, UriOpenerDummy>();
                break;

            case GameController.DisplayMode.Clyde:
                IoCManager.Register <IClyde, Clyde>();
                IoCManager.Register <IClipboardManager, Clyde>();
                IoCManager.Register <IClydeAudio, Clyde>();
                IoCManager.Register <IClydeInternal, Clyde>();
                IoCManager.Register <IInputManager, ClydeInputManager>();
                IoCManager.Register <IFileDialogManager, FileDialogManager>();
                IoCManager.Register <IUriOpener, UriOpener>();
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }

            IoCManager.Register <IFontManager, FontManager>();
            IoCManager.Register <IFontManagerInternal, FontManager>();
            IoCManager.Register <IEyeManager, EyeManager>();
            IoCManager.Register <IPlacementManager, PlacementManager>();
            IoCManager.Register <IOverlayManager, OverlayManager>();
            IoCManager.Register <IOverlayManagerInternal, OverlayManager>();
            IoCManager.Register <IViewVariablesManager, ViewVariablesManager>();
            IoCManager.Register <IViewVariablesManagerInternal, ViewVariablesManager>();
            IoCManager.Register <IClientConGroupController, ClientConGroupController>();
            IoCManager.Register <IScriptClient, ScriptClient>();
        }
Beispiel #4
0
        public static void RegisterIoC(GameController.DisplayMode mode)
        {
            SharedIoC.RegisterIoC();

            IoCManager.Register <IPrototypeManager, PrototypeManager>();
            IoCManager.Register <IEntityManager, ClientEntityManager>();
            IoCManager.Register <IComponentFactory, ClientComponentFactory>();
            IoCManager.Register <ITileDefinitionManager, ClydeTileDefinitionManager>();
            IoCManager.Register <IClydeTileDefinitionManager, ClydeTileDefinitionManager>();
            IoCManager.Register <IGameController, GameController>();
            IoCManager.Register <IGameControllerInternal, GameController>();
            IoCManager.Register <IReflectionManager, ClientReflectionManager>();
            IoCManager.Register <IResourceManager, ResourceCache>();
            IoCManager.Register <IResourceManagerInternal, ResourceCache>();
            IoCManager.Register <IResourceCache, ResourceCache>();
            IoCManager.Register <IResourceCacheInternal, ResourceCache>();
            IoCManager.Register <IClientNetManager, NetManager>();
            IoCManager.Register <IClientEntityManager, ClientEntityManager>();
            IoCManager.Register <IEntityNetworkManager, ClientEntityNetworkManager>();
            IoCManager.Register <IClientGameStateManager, ClientGameStateManager>();
            IoCManager.Register <IBaseClient, BaseClient>();
            IoCManager.Register <IPlayerManager, PlayerManager>();
            IoCManager.Register <IStateManager, StateManager>();
            IoCManager.Register <IUserInterfaceManager, UserInterfaceManager>();
            IoCManager.Register <IUserInterfaceManagerInternal, UserInterfaceManager>();
            IoCManager.Register <IDebugDrawing, DebugDrawing>();
            IoCManager.Register <ILightManager, LightManager>();
            IoCManager.Register <IDiscordRichPresence, DiscordRichPresence>();
            IoCManager.Register <IClientConsole, ClientConsole>();
            IoCManager.Register <IFontManager, FontManager>();
            IoCManager.Register <IFontManagerInternal, FontManager>();
            switch (mode)
            {
            case GameController.DisplayMode.Headless:
                IoCManager.Register <IClyde, ClydeHeadless>();
                IoCManager.Register <IClydeAudio, ClydeHeadless>();
                IoCManager.Register <IClydeInternal, ClydeHeadless>();
                IoCManager.Register <IInputManager, InputManager>();
                IoCManager.Register <IFileDialogManager, DummyFileDialogManager>();
                IoCManager.Register <IUriOpener, UriOpenerDummy>();
                break;

            case GameController.DisplayMode.Clyde:
                IoCManager.Register <IClyde, Clyde>();
                IoCManager.Register <IClydeAudio, Clyde>();
                IoCManager.Register <IClydeInternal, Clyde>();
                IoCManager.Register <IInputManager, ClydeInputManager>();
                IoCManager.Register <IFileDialogManager, FileDialogManager>();
#if LINUX
                IoCManager.Register <IUriOpener, UriOpenerLinux>();
#elif MACOS
                IoCManager.Register <IUriOpener, UriOpenerMacOS>();
#elif WINDOWS
                IoCManager.Register <IUriOpener, UriOpenerWindows>();
#endif
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }

            IoCManager.Register <IEyeManager, EyeManager>();

            IoCManager.Register <IPlacementManager, PlacementManager>();
            IoCManager.Register <IOverlayManager, OverlayManager>();
            IoCManager.Register <IOverlayManagerInternal, OverlayManager>();
            IoCManager.Register <IViewVariablesManager, ViewVariablesManager>();
            IoCManager.Register <IViewVariablesManagerInternal, ViewVariablesManager>();

#if LINUX
            IoCManager.Register <IClipboardManager, ClipboardManagerLinux>();
            IoCManager.Register <IClipboardManagerInternal, ClipboardManagerLinux>();
#elif WINDOWS
            IoCManager.Register <IClipboardManager, ClipboardManagerWindows>();
            IoCManager.Register <IClipboardManagerInternal, ClipboardManagerWindows>();
#else
            IoCManager.Register <IClipboardManager, ClipboardManagerUnsupported>();
            IoCManager.Register <IClipboardManagerInternal, ClipboardManagerUnsupported>();
#endif

            IoCManager.Register <ISignalHandler, ClientSignalHandler>();
        }