public string ProcessRequest(string request)
{
var req = JsonConvert.DeserializeObject<Request>(request);
foreach (var element in CommandFactory.Instance.AllCommands)
{
if (req.Command == element.Name)
{
return JsonConvert.SerializeObject(element.DoWork(request));
}
}
return JsonConvert.SerializeObject(new Response { RequestCommand = req.Command, Status = Statuses.Unknown });
}