public static void AssertAllOfType(this JsonMessageLog log, GameMessageType messageType) { foreach (dynamic msg in log.Messages) { Assert.IsTrue(msg.type == messageType.ToString()); } }
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); }
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(); }
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))); }
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; }
public override string ToString() { return(m_messageType.ToString()); }