public string PushToQueue(string queue, string body, string headers)
{
List<KeyValuePair<string, string>> headerList = new List<KeyValuePair<string, string>>();
try
{
string[] parts = headers.Split(new char[] { ',' });
foreach (string part in parts)
{
if (part.Trim() != string.Empty && part != null)
{
string[] x = part.Split(new char[] { ':' });
if (x.Length > 1)
{
headerList.Add(new KeyValuePair<string, string>(x[0], x[1]));
}
}
}
}
catch (Exception e)
{
throw new Exception("Headers may be in invalid format.");
}
string d = string.Empty;
AtulBusinessLogic adb = new AtulBusinessLogic();
d = adb.PushToQueue(queue.Trim(), body.Trim(), headerList);
return d;
}