public RPCSystem GetSystem() { RPCMethod meth = new RPCMethod("GetSystem"); string res = this.Call(meth); return(JsonSerializer.Deserialize <RPCSystem>(res)); }
public string Call(RPCMethod method) { var messageBytes = Encoding.UTF8.GetBytes(JsonSerializer.Serialize(method)); cmdchannel.BasicPublish( exchange: "", routingKey: "radio_rpc", basicProperties: props, body: messageBytes); cmdchannel.BasicConsume( consumer: consumer, queue: replyQueueName, autoAck: true); return(respQueue.Take()); }