Esempio n. 1
0
 // GET: api/Games/1234
 public async Task<IHttpActionResult> Get(string id)
 {
     var gameDocument = await _games.GetGame(id);
     if (gameDocument == null)
     {
         return NotFound();
     }
     Game game = new Game(gameDocument);
     var gameResponse = new GameResponse(game);
     return Ok(gameResponse);
 }
Esempio n. 2
0
 /// <summary>
 /// Response on client's attempt to watch the game
 /// </summary>
 /// <param name="res">Response with success or failure message</param>
 void IGameManagerCallback.HasWatchedGame(GameResponse res)
 {
     System.Console.WriteLine(res.Message);
 }
Esempio n. 3
0
 /// <summary>
 /// System error message display to client
 /// </summary>
 /// <param name="res">Response error message</param>
 void IGameManagerCallback.CatchError(GameResponse res)
 {
     System.Console.WriteLine(res.Message);
 }