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

            JsonConvert.PopulateObject(json, obj);
            return(obj);
        }
Beispiel #2
0
        public void SendTextRankCalculated(string id, float score)
        {
            using (var connection = this._factory.CreateConnection())
                using (var channel = connection.CreateModel())
                {
                    DeclareExchanges(channel);

                    var message = new TextRankCalculatedMessage();
                    message.ContextId = id;
                    message.Score     = score;
                    this.SendMessage(channel, ExchangeTextRankCalculated, message.ToJson());
                }
        }