/// <summary> /// Returns true if Routing instances are equal /// </summary> /// <param name="input">Instance of Routing to be compared</param> /// <returns>Boolean</returns> public bool Equals(Routing input) { if (input == null) { return(false); } return (( CalcPoints == input.CalcPoints || (CalcPoints != null && CalcPoints.Equals(input.CalcPoints)) ) && ( ConsiderTraffic == input.ConsiderTraffic || (ConsiderTraffic != null && ConsiderTraffic.Equals(input.ConsiderTraffic)) ) && ( NetworkDataProvider == input.NetworkDataProvider || (NetworkDataProvider != null && NetworkDataProvider.Equals(input.NetworkDataProvider)) ) && ( FailFast == input.FailFast || (FailFast != null && FailFast.Equals(input.FailFast)) )); }
/// <summary>Initializes providers and repositories of data.</summary> /// <param name="options">Additional request options.</param> private void InitializeProviders(RequestOptions options) { if (this.repository == null) { this.repository = Repository.Create(this.ConnectionString, options); } var networkDataProvider = new NetworkDataProvider(this.ErrorHandler); this.machineDataProvider = new MachineDataProvider { MachineExternalIp = networkDataProvider.GetMachineIp(this.ExternalIpCheckAddress) }; }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { int hashCode = 41; if (CalcPoints != null) { hashCode = hashCode * 59 + CalcPoints.GetHashCode(); } if (ConsiderTraffic != null) { hashCode = hashCode * 59 + ConsiderTraffic.GetHashCode(); } if (NetworkDataProvider != null) { hashCode = hashCode * 59 + NetworkDataProvider.GetHashCode(); } if (FailFast != null) { hashCode = hashCode * 59 + FailFast.GetHashCode(); } return(hashCode); } }