/// 46.) public void CreatePracticeGame(PracticeGameConfig practiceGameConfig, GameDTO.Callback callback) { GameDTO cb = new GameDTO(callback); InvokeWithCallback("gameService", "createPracticeGame", new object[] { practiceGameConfig.GetBaseTypedObject() }, cb); }
public GameDTO CreatePracticeGame(PracticeGameConfig practiceGameConfig) { int Id = Invoke("gameService", "createPracticeGame", new object[] { practiceGameConfig.GetBaseTypedObject() }); while (!results.ContainsKey(Id)) System.Threading.Thread.Sleep(10); TypedObject messageBody = results[Id].GetTO("data").GetTO("body"); GameDTO result = new GameDTO(messageBody); results.Remove(Id); return result; }
public async Task<GameDTO> CreatePracticeGame(PracticeGameConfig practiceGameConfig) { int Id = Invoke("gameService", "createPracticeGame", new object[] { practiceGameConfig.GetBaseTypedObject() }); while (!results.ContainsKey(Id)) await Task.Delay(10); TypedObject messageBody = results[Id].GetTO("data").GetTO("body"); GameDTO result = new GameDTO(messageBody); results.Remove(Id); return result; }