Esempio n. 1
0
        internal static void FinalizePluginsCommands()
        {
            foreach (var iSynapseCommand in AwaitingFinalization)
            {
                var command = GeneratedCommand.FromSynapseCommand(iSynapseCommand);
                foreach (var platform in command.Platforms)
                {
                    switch (platform)
                    {
                    case Platform.ClientConsole:
                        SynapseController.CommandHandlers.ClientCommandHandler.RegisterCommand(command);
                        break;

                    case Platform.RemoteAdmin:
                        SynapseController.CommandHandlers.RemoteAdminHandler.RegisterCommand(command);
                        break;

                    case Platform.ServerConsole:
                        SynapseController.CommandHandlers.ServerConsoleHandler.RegisterCommand(command);
                        break;
                    }
                }
            }
            AwaitingFinalization.Clear();
        }
Esempio n. 2
0
        internal static void RegisterCommand(ISynapseCommand iSynapseCommand, bool awaitPluginInitialisation)
        {
            if (awaitPluginInitialisation)
            {
                AwaitingFinalization.Add(iSynapseCommand);
                return;
            }

            var command = GeneratedCommand.FromSynapseCommand(iSynapseCommand);

            foreach (var platform in command.Platforms)
            {
                switch (platform)
                {
                case Platform.ClientConsole:
                    SynapseController.CommandHandlers.ClientCommandHandler.RegisterCommand(command);
                    break;

                case Platform.RemoteAdmin:
                    SynapseController.CommandHandlers.RemoteAdminHandler.RegisterCommand(command);
                    break;

                case Platform.ServerConsole:
                    SynapseController.CommandHandlers.ServerConsoleHandler.RegisterCommand(command);
                    break;
                }
            }
        }
Esempio n. 3
0
        internal static void FinalizePluginsCommands()
        {
            foreach (var iSynapseCommand in AwaitingFinalization)
            {
                RegisterGeneratedCommand(GeneratedCommand.FromSynapseCommand(iSynapseCommand));
            }

            AwaitingFinalization.Clear();
        }
Esempio n. 4
0
        internal static void RegisterCommand(ISynapseCommand iSynapseCommand, bool awaitPluginInitialisation)
        {
            if (awaitPluginInitialisation)
            {
                AwaitingFinalization.Add(iSynapseCommand);
                return;
            }

            RegisterGeneratedCommand(GeneratedCommand.FromSynapseCommand(iSynapseCommand));
        }
Esempio n. 5
0
        internal static void RegisterGeneratedCommand(GeneratedCommand command)
        {
            foreach (var platform in command.Platforms)
            {
                switch (platform)
                {
                case Platform.ClientConsole:

                    SynapseController.CommandHandlers.ClientCommandHandler.RegisterCommand(command);
                    break;

                case Platform.RemoteAdmin:
                    SynapseController.CommandHandlers.RemoteAdminHandler.RegisterCommand(command);
                    break;

                case Platform.ServerConsole:
                    SynapseController.CommandHandlers.ServerConsoleHandler.RegisterCommand(command);
                    break;
                }
            }
        }