Esempio n. 1
0
        /// <summary>
        /// Deserialize string of a JSON format into a <see cref="GameRequest"/>
        /// </summary>
        /// <param name="input"></param>
        public GameRequest ConvertToGameRequest(string input)
        {
            GameRequest messageToReturn = JsonConvert.DeserializeObject <GameRequest>(input);

            return(messageToReturn);
        }
Esempio n. 2
0
 // Might be needed for chat later
 public byte[] ToByteArray(GameRequest input)
 {
     throw new NotImplementedException();
 }
Esempio n. 3
0
        /// <summary>
        /// Serialize <see cref="GameRequest"/> into a string of a JSON format
        /// </summary>
        /// <param name="input"></param>
        public string ConvertFromGameRequest(GameRequest input)
        {
            string messageToReturn = JsonConvert.SerializeObject(input, Formatting.Indented);

            return(messageToReturn);
        }