コード例 #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();
        }
コード例 #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;
                }
            }
        }
コード例 #3
0
        internal static void FinalizePluginsCommands()
        {
            foreach (var iSynapseCommand in AwaitingFinalization)
            {
                RegisterGeneratedCommand(GeneratedCommand.FromSynapseCommand(iSynapseCommand));
            }

            AwaitingFinalization.Clear();
        }
コード例 #4
0
        internal static void RegisterCommand(ISynapseCommand iSynapseCommand, bool awaitPluginInitialisation)
        {
            if (awaitPluginInitialisation)
            {
                AwaitingFinalization.Add(iSynapseCommand);
                return;
            }

            RegisterGeneratedCommand(GeneratedCommand.FromSynapseCommand(iSynapseCommand));
        }
コード例 #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;
                }
            }
        }