Пример #1
0
 public static void AssertAllOfType(this JsonMessageLog log, GameMessageType messageType)
 {
     foreach (dynamic msg in log.Messages)
     {
         Assert.IsTrue(msg.type == messageType.ToString());
     }
 }
Пример #2
0
 public static void AssertAllOfType(this JsonMessageLog log, GameMessageType messageType)
 {
     foreach (dynamic msg in log.Messages)
     {
         Assert.IsTrue(msg.type == messageType.ToString());
     }
 }
Пример #3
0
        private JsonObject BuildGameMessageJson(GameMessageType messageType, Action <dynamic> applyValues)
        {
            dynamic jsonObject = new JsonObject();

            jsonObject.type = messageType.ToString();
            jsonObject.body = new JsonObject();
            applyValues(jsonObject.body);
            return(jsonObject);
        }
Пример #4
0
 public MessageWrapper(GameMessageType messageType, string message, string gameId, string token = null, string clientId = null)
 {
     this.eMessageType = messageType;
     this.message      = message;
     this.gameID       = gameId;
     this.token        = token;
     this.clientID     = clientId;
     this.messageType  = eMessageType.ToString();
 }
Пример #5
0
    private static string LobbyIdJson(GameMessageType gameMessageType, string lobbyId)
    {
        var lobbyIdJson = new LobbyId()
        {
            lobbyId = lobbyId
        };
        var jsonString = JsonConvert.SerializeObject(lobbyIdJson);

        return(JsonCreator.RemoveSlash(JsonCreator.CreateJson(gameMessageType.ToString(), jsonString)));
    }
Пример #6
0
 private JsonObject BuildGameMessageJson(GameMessageType messageType, Action<dynamic> applyValues)
 {
     dynamic jsonObject = new JsonObject();
     jsonObject.type = messageType.ToString();
     jsonObject.body = new JsonObject();
     applyValues(jsonObject.body);
     return jsonObject;
 }
Пример #7
0
 public override string ToString()
 {
     return(m_messageType.ToString());
 }