public static TextProcessingAcceptedMessage FromJson(string json)
        {
            var obj = new TextProcessingAcceptedMessage();

            JsonConvert.PopulateObject(json, obj);
            return(obj);
        }
Exemple #2
0
 public void SendProcessingAccepted(string id, bool accepted)
 {
     using (var connection = this._factory.CreateConnection())
         using (var channel = connection.CreateModel())
         {
             DeclareExchanges(channel);
             var message = new TextProcessingAcceptedMessage();
             message.ContextId = id;
             message.Accepted  = accepted;
             this.SendMessage(channel, ExchangeProcessingAccepted, message.ToJson());
         }
 }