예제 #1
0
 public virtual RouteDownstreamHostAndPort FindDownstreamHostAndPort(string host, int port)
 {
     return(DownstreamHostAndPorts.FirstOrDefault(c => c.Host == host && c.Port == port));
 }
예제 #2
0
 public virtual void RemoveAllDownstreamHostAndPorts()
 {
     DownstreamHostAndPorts.Clear();
 }
예제 #3
0
 public virtual void RemoveDownstreamHostAndPort(string host, int port)
 {
     DownstreamHostAndPorts.RemoveAll(c => c.Host == host && c.Port == port);
 }
예제 #4
0
 public virtual void AddDownstreamHostAndPort(string host, int port)
 {
     DownstreamHostAndPorts.Add(new RouteDownstreamHostAndPort(GlobalConfigurationId, Name, host, port));
 }
예제 #5
0
 public virtual void AddDownstreamHostAndPort(string host, int port)
 {
     DownstreamHostAndPorts.Add(new ReRouteDownstreamHostAndPort(host, port));
 }
예제 #6
0
 public void RemoveAllDownstreamHost()
 {
     DownstreamHostAndPorts.Clear();
 }
예제 #7
0
 public void RemoveDownstreamHost(string host, int?port)
 {
     DownstreamHostAndPorts.RemoveAll(x => x.Host.Equals(host, StringComparison.CurrentCultureIgnoreCase) &&
                                      x.Port.Equals(port));
 }
예제 #8
0
 public void AddDownstreamHost(IGuidGenerator generator, string host, int?port)
 {
     DownstreamHostAndPorts.AddIfNotContains(new RouteDownstreamHostAndPort(Id, generator.Create(), host, port));
 }