private byte[] DoWCFService_Del(byte[] ParameterData) { string _wss = CommandCommon.GetParamDataObj <string>(ParameterData); Configuration cfa = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); CheckWCFServiceConfigSection CurrentSeviceList = (CheckWCFServiceConfigSection)cfa.GetSection("CheckWCFServiceList"); CurrentSeviceList.PluginCollection.Remove(_wss); cfa.Save(); ConfigurationManager.RefreshSection("CheckWCFServiceList"); string _ret = "TRUE"; TaskList.RunTaskImmediately("SystemSelfCheck"); byte[] _data = Encoding.Unicode.GetBytes(_ret); return(_data); }
private List<WCFServiceStatus> GetWCFStatus() { List<WCFServiceStatus> _ret = new List<WCFServiceStatus>(); CheckWCFServiceConfigSection WcfServiceList = (CheckWCFServiceConfigSection)ConfigurationManager.GetSection("CheckWCFServiceList"); foreach (CheckWCFServiceConfigurationElement _el in WcfServiceList.PluginCollection) { WCFServiceStatus _wss = new WCFServiceStatus(); _wss.Name = _el.Name; _wss.Description = _el.Description; _wss.WCFType = _el.Type; string _err = ""; _wss.WcfStauts = CheckWcfRequest_old(_el.Type, _el.URL, ref _err); _wss.WcfError = _err; _ret.Add(_wss); } return _ret; }
private byte[] DoWCFService_Add(byte[] ParameterData) { WCFServiceStatus _wss = CommandCommon.GetParamDataObj <WCFServiceStatus>(ParameterData); Configuration cfa = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); CheckWCFServiceConfigSection CurrentSeviceList = (CheckWCFServiceConfigSection)cfa.GetSection("CheckWCFServiceList"); CheckWCFServiceConfigurationElement _new = new CheckWCFServiceConfigurationElement(); _new.Name = _wss.Name; _new.Description = _wss.Description; _new.Type = _wss.WCFType; _new.URL = _wss.URL; CurrentSeviceList.PluginCollection.Add(_new); cfa.Save(); ConfigurationManager.RefreshSection("CheckWCFServiceList"); string _ret = "TRUE"; TaskList.RunTaskImmediately("SystemSelfCheck"); byte[] _data = Encoding.Unicode.GetBytes(_ret); return(_data); }