private static void LoadConf() { if (config != null) { return; } string filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, configFileName); if (!File.Exists(filePath)) { filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "bin", configFileName); if (!File.Exists(filePath)) { throw new ArgumentNullException($"fild nofound path:{Path.Combine(AppDomain.CurrentDomain.BaseDirectory, configFileName)} path:{filePath}"); } } config = ThriftConfig.GetConfig(filePath); if (config == null) { throw new ArgumentNullException($"config is null path:{filePath}"); } visitAppName = ConfigurationManager.AppSettings.Get("AppName") ?? visitAppName; SetFreeEvent(); }
internal override string Invoke(Dictionary <string, string> command) { AnnoDataResult result = new AnnoDataResult(); result.Status = false; try { ThriftConfig tc = ThriftConfig.CreateInstance(); result.Status = tc.ChangeMicroServiceWeight(command); } catch (Exception ex) { result.Data = ex.Message; } finally { } return(Newtonsoft.Json.JsonConvert.SerializeObject(result)); }