public ActionResult GameStateCompleted(GameViewModel gameState) { return new GameViewModelResult(gameState, this); }
public GameViewModelResult(GameViewModel model, Controller controller) { model.Log = controller.Server.HtmlEncode(model.Log) .Replace(Environment.NewLine, "<br/>"); // there has to be a better way to do this, why am I so dumb Data = model; SerializerSettings = new JsonSerializerSettings { Converters = { new ImageConverter(controller.Url) } }; }