/// <summary>
 /// 向表中增加服务信息
 /// </summary>
 /// <param name="service"></param>
 /// <returns></returns>
 public void AddServiceInfo(ServiceInfo service)
 {
     var temp = this.Services.ToList();
     temp.Add(service);
     this.Services = temp.ToArray();
 }
 private ServiceConfig GetDefaultServiceConfig(ServiceInfo service)
 {
     //TODO:常用负载算法
     return service.Configs[this._rd.Next(0, service.Configs.Length)];
     //return service.Configs.First();
 }
Esempio n. 3
0
 private ServiceConfig GetDefaultServiceConfig(ServiceInfo service)
 {
     //TODO:常用负载算法
     return(service.Configs[this._rd.Next(0, service.Configs.Length)]);
     //return service.Configs.First();
 }
 public ServiceConfig GetServiceConfig(ServiceInfo service, string method, params ServiceCallArgument[] args)
 {
     //if (string.IsNullOrEmpty(service.LoadBalancingAlgorithm))
     return this.GetDefaultServiceConfig(service);
 }
Esempio n. 5
0
 public ServiceConfig GetServiceConfig(ServiceInfo service, string method, params ServiceCallArgument[] args)
 {
     //if (string.IsNullOrEmpty(service.LoadBalancingAlgorithm))
     return(this.GetDefaultServiceConfig(service));
 }