public OptionsHandlerTest()
        {
            var request = new Request {
                Method  = "OPTIONS",
                Path    = "/method_options",
                Version = "HTTP/1.1"
            };
            var handler = new OptionsHandler();

            _response = handler.Handle(request);
        }
示例#2
0
        private static void AddData(string timestamp, string method, string data)
        {
            switch (method)
            {
            case "GameState.DebugPrintPower":
                DataHandler.Handle(timestamp, data, State);
                break;

            case "GameState.SendChoices":
                SendChoicesHandler.Handle(timestamp, data, State);
                break;

            case "GameState.DebugPrintChoices":
            case "GameState.DebugPrintEntityChoices":
                ChoicesHandler.Handle(timestamp, data, State);
                break;

            case "GameState.DebugPrintEntitiesChosen":
                EntityChosenHandler.Handle(timestamp, data, State);
                break;

            case "GameState.DebugPrintOptions":
                OptionsHandler.Handle(timestamp, data, State);
                break;

            case "GameState.SendOption":
                SendOptionHandler.Handle(timestamp, data, State);
                break;

            case "GameState.OnEntityChoices":
                // Spectator mode noise
                break;

            case "ChoiceCardMgr.WaitThenShowChoices":
                // Not needed for replays
                break;

            case "GameState.DebugPrintChoice":
                Console.WriteLine("Warning: DebugPrintChoice was removed in 10357. Ignoring.");
                break;

            default:
                if (!method.StartsWith("PowerTaskList.") && !method.StartsWith("PowerProcessor.") && !method.StartsWith("PowerSpellController"))
                {
                    Console.WriteLine("Warning: Unhandled method: " + method);
                }
                break;
            }
        }