public static string HandleLocalHttpTask(HttpTask task) { string json = string.Empty; if (task != null) { try { ConsoleEx.DebugLog(task.relation.requetType.ToString() + " " + ReflectDefined[task.relation.requetType].ToString()); JsonFactory factory = Activator.CreateInstance(ReflectDefined[task.relation.requetType]) as JsonFactory; json = factory.generateLocalJson(task); } catch (Exception ex) { ConsoleEx.DebugLog("Request : " + task.relation.requetType.ToString() + "\n" + ex.ToString()); } } return(json); }