public static TextSuccessMarkedMessage FromJson(string json) { var obj = new TextSuccessMarkedMessage(); JsonConvert.PopulateObject(json, obj); return(obj); }
public void SendTextSuccessMarked(string id, bool isTextSuccessful) { using (var connection = this._factory.CreateConnection()) using (var channel = connection.CreateModel()) { DeclareExchanges(channel); var message = new TextSuccessMarkedMessage(); message.ContextId = id; message.Success = isTextSuccessful; this.SendMessage(channel, ExchangeTextSuccessMarked, message.ToJson()); } }