//returns a json object of all logs public string Execute(string[] args, out bool result) { List <LogInfo> list = this.ils.GetMessages(); List <LogData> lds = new List <LogData>(); //for comunication foreach (LogInfo info in list) { LogData data = new LogData(); data.Message = info.Message; data.Type = info.Type; lds.Add(data); } result = true; return(JsonConvertor.ConvertToJson(lds)); }
public string Execute(string[] args, out bool result) { ConfigFileData cfd = new ConfigFileData(); try { cfd.OutputDir = ReadAppConfig.ReadSetting("OutPutDir"); cfd.SourceDir = ReadAppConfig.readAppSettings("ImageServiceSource"); cfd.LogName = ReadAppConfig.readAppSettings("ImageServiceLog"); cfd.ThumnailSize = ReadAppConfig.ReadThumbnailSize("ThumbnailSize"); cfd.InputDirs = ReadAppConfig.ReadSetting("Handlers").Split(';'); result = true; return(JsonConvertor.ConvertToJson(cfd)); } catch { result = false; return("problem occured"); } }