public StatusCode Init(string param_key) { StatusCode retVal = StatusCode.SUCCEED_STATUS; lock (this) { if (CanInitialize == false) { return(retVal); } string strValue = Access.ParameterAccess.GetStringValue(param_key); StatusCode.Debug("KEY:" + param_key + " VAL:" + strValue, Config); List <short> lstServerToActivate = new List <short>(); if (string.IsNullOrEmpty(strValue) == false) { lstServerToActivate = Newtonsoft.Json.JsonConvert.DeserializeObject <List <short> >(strValue); } List <Models.ServiceType> lstType = GyomuDataAccess.GetAllServiceType(); List <Models.Service> lstServerService = GyomuDataAccess.GetAllService(); retVal = internalInit(lstServerService, lstType); if (retVal.IsSucceeded == false) { return(retVal); } } return(retVal); }
public void CheckServiceThreadState() { foreach (IService svc in dictThreadService.Keys) { Task t = dictThreadService[svc]; if (t.Exception != null) { StatusCode.Debug(svc.Description + " has Error \n" + t.Exception.ToString(), Config); } } }