public static void SendOut(IQueueMessage request, string hostAddress, string method, int ProcessTimeout, bool IsAsync, bool enableException = false) { //request.IsDuplex = false; using (HttpClientQueue client = new HttpClientQueue(hostAddress, method, ProcessTimeout)) { client.Execute(request, enableException); } }
public static QueueAck Management(IQueueMessage request, string hostAddress, string method, int ProcessTimeout, bool IsAsync, bool enableException = false) { //Type type = request.BodyType; using (HttpClientQueue client = new HttpClientQueue(hostAddress, method, ProcessTimeout)) { var response = client.Execute <QueueAck>(request, enableException); return(response); //byte[] body = response == null ? null : Encoding.UTF8.GetBytes(response); //var item = request.Copy(); //item.SetBodyText(response); //item.SetArrived(); //return item;// new QueueItem(request, body, typeof(string)); } //return null; }