/// <summary> /// Gets the territory data manager. /// </summary> /// <param name="dataComponentType">Type of the data component.</param> /// <returns></returns> public ITerritoryDataManager GetTerritoryDataManager(DataComponentType dataComponentType) { ITerritoryDataManager territoryDataManager; switch (dataComponentType) { case DataComponentType.InMemoryData: territoryDataManager = new TerritoryDataManager(); break; default: territoryDataManager = new TerritoryDataManager(); break; } return territoryDataManager; }
/// <summary> /// Gets the agent data manager. /// </summary> /// <param name="dataComponentType">Type of the data component.</param> /// <returns></returns> public IAgentDataManager GetAgentDataManager(DataComponentType dataComponentType) { IAgentDataManager agentDataManager; switch (dataComponentType) { case DataComponentType.InMemoryData: agentDataManager = new AgentDataManager(); break; default: agentDataManager = new AgentDataManager(); break; } return agentDataManager; }
public SQLCruelComponentSolver(TwitchModule module) : base(module, "SQLModule", "!{0} toggle [Toggles between showing the goal table and the editor] | !{0} SELECT AGG(X), Y, Z [Sets the SELECT clause, where X has an optional aggregator] | !{0} WHERE X OPER Y [Sets the WHERE clause] | !{0} GROUP BY X [Sets the GROUP BY clause] | !{0} LIMIT X, Y [Sets the LIMIT clause] | !{0} check/submit [Presses the check button]") { // Generated answer is not stored anywhere in the mod, best way I can think of to get it for autosolver var source = DataComponentType.CallMethod <object>("FromDifficulty", null, _component.GetValue <object>("difficulty")); var getAnswerThread = new Thread(() => { targetQueryObj = Data2ComponentType.CallMethod <object>("GenerateFromDifficulty", null, _component.GetValue <object>("difficulty"), source); while (_component.GetValue <object>("goal").ToString() != targetQueryObj.CallMethod <object>("Apply", source).ToString()) { targetQueryObj = Data2ComponentType.CallMethod <object>("GenerateFromDifficulty", null, _component.GetValue <object>("difficulty"), source); } receivedAnswer = true; return; }); getAnswerThread.Start(); }