mirror of
				https://github.com/nsnail/Ocelot.git
				synced 2025-11-04 20:10:50 +08:00 
			
		
		
		
	Revert "Add 'Name' property to ILoadBalancer, for future use in LoadBalancerFactory."
This reverts commit 78ead1606dc6a4d6b47b5e63bbf7927ef02e9320.
This commit is contained in:
		@@ -84,7 +84,5 @@ namespace Ocelot.LoadBalancer.LoadBalancers
 | 
				
			|||||||
        public void Release(ServiceHostAndPort hostAndPort)
 | 
					        public void Release(ServiceHostAndPort hostAndPort)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					 | 
				
			||||||
        public string Name => GetType().Name;
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -10,7 +10,5 @@ namespace Ocelot.LoadBalancer.LoadBalancers
 | 
				
			|||||||
        Task<Response<ServiceHostAndPort>> Lease(DownstreamContext context);
 | 
					        Task<Response<ServiceHostAndPort>> Lease(DownstreamContext context);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        void Release(ServiceHostAndPort hostAndPort);
 | 
					        void Release(ServiceHostAndPort hostAndPort);
 | 
				
			||||||
 | 
					 | 
				
			||||||
        string Name { get; }
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -71,8 +71,6 @@ namespace Ocelot.LoadBalancer.LoadBalancers
 | 
				
			|||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public string Name => GetType().Name;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        private Lease AddConnection(Lease lease)
 | 
					        private Lease AddConnection(Lease lease)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            return new Lease(lease.HostAndPort, lease.Connections + 1);
 | 
					            return new Lease(lease.HostAndPort, lease.Connections + 1);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -33,7 +33,5 @@ namespace Ocelot.LoadBalancer.LoadBalancers
 | 
				
			|||||||
        public void Release(ServiceHostAndPort hostAndPort)
 | 
					        public void Release(ServiceHostAndPort hostAndPort)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					 | 
				
			||||||
        public string Name => GetType().Name;
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -38,7 +38,5 @@ namespace Ocelot.LoadBalancer.LoadBalancers
 | 
				
			|||||||
        public void Release(ServiceHostAndPort hostAndPort)
 | 
					        public void Release(ServiceHostAndPort hostAndPort)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					 | 
				
			||||||
        public string Name => GetType().Name;
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -164,8 +164,6 @@ namespace Ocelot.UnitTests.LoadBalancer
 | 
				
			|||||||
            {
 | 
					            {
 | 
				
			||||||
                throw new NotImplementedException();
 | 
					                throw new NotImplementedException();
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					 | 
				
			||||||
            public string Name => GetType().Name;
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        private class FakeRoundRobinLoadBalancer : ILoadBalancer
 | 
					        private class FakeRoundRobinLoadBalancer : ILoadBalancer
 | 
				
			||||||
@@ -179,8 +177,6 @@ namespace Ocelot.UnitTests.LoadBalancer
 | 
				
			|||||||
            {
 | 
					            {
 | 
				
			||||||
                throw new NotImplementedException();
 | 
					                throw new NotImplementedException();
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					 | 
				
			||||||
            public string Name => GetType().Name;
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user