/// <summary>Compares this route to another.</summary> /// <remarks>Compares this route to another.</remarks> /// <param name="obj">the object to compare with</param> /// <returns> /// <code>true</code> if the argument is the same route, /// <code>false</code> /// </returns> public sealed override bool Equals(object obj) { if (this == obj) { return(true); } if (obj is Apache.Http.Conn.Routing.HttpRoute) { Apache.Http.Conn.Routing.HttpRoute that = (Apache.Http.Conn.Routing.HttpRoute)obj; return((this.secure == that.secure) && (this.tunnelled == that.tunnelled) && (this .layered == that.layered) && LangUtils.Equals(this.targetHost, that.targetHost) && LangUtils.Equals(this.localAddress, that.localAddress) && LangUtils.Equals(this .proxyChain, that.proxyChain)); } else { // Do the cheapest tests first return(false); } }
/// <summary>Creates a new tracker for the given route.</summary> /// <remarks> /// Creates a new tracker for the given route. /// Only target and origin are taken from the route, /// everything else remains to be tracked. /// </remarks> /// <param name="route">the route to track</param> public RouteTracker(HttpRoute route) : this(route.GetTargetHost(), route.GetLocalAddress ()) { }