public static VowelConsCountMessage FromJson(string json) { var obj = new VowelConsCountMessage(); JsonConvert.PopulateObject(json, obj); return(obj); }
public void SendTextScoreTask(string id, int vowelCount, int consCount) { using (var connection = this._factory.CreateConnection()) using (var channel = connection.CreateModel()) { DeclareExchanges(channel); var message = new VowelConsCountMessage(); message.ContextId = id; message.VowelCount = vowelCount; message.ConsCount = consCount; this.SendMessage(channel, ExchangeTextScoreTask, message.ToJson()); } }