public void EqualsAndHash() { Limit limit = new Limit(1, 2); Limit same = new Limit(1, 2, 0, 0); Limit diff = new Limit(3, 4); Assert.IsTrue(limit.Equals(limit)); Assert.IsFalse(limit.Equals(null)); Assert.IsTrue(limit.Equals(same)); Assert.IsTrue(same.Equals(limit)); Assert.IsFalse(limit.Equals(diff)); Assert.AreEqual(limit.GetHashCode(), same.GetHashCode()); Assert.AreNotEqual(limit.GetHashCode(), diff.GetHashCode()); }
/// <summary> /// Compares two id tag infos for equality. /// </summary> /// <param name="ChargingSchedulePeriod">An id tag info to compare with.</param> /// <returns>True if both match; False otherwise.</returns> public Boolean Equals(ChargingSchedulePeriod ChargingSchedulePeriod) { if ((Object)ChargingSchedulePeriod == null) { return(false); } return(StartPeriod.Equals(ChargingSchedulePeriod.StartPeriod) && Limit.Equals(ChargingSchedulePeriod.Limit) && NumberPhases.Equals(ChargingSchedulePeriod.NumberPhases)); }
/// <summary> /// Returns true if RequestedPageDetails instances are equal /// </summary> /// <param name="other">Instance of RequestedPageDetails to be compared</param> /// <returns>Boolean</returns> public bool Equals(RequestedPageDetails other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Start == other.Start || Start.Equals(other.Start) ) && ( Limit == other.Limit || Limit.Equals(other.Limit) ) && ( OrderBy == other.OrderBy || OrderBy != null && OrderBy.Equals(other.OrderBy) ) && ( Property == other.Property || Property != null && other.Property != null && Property.SequenceEqual(other.Property) ) && ( Type == other.Type || Type != null && Type.Equals(other.Type) ) && ( Next == other.Next || Next.Equals(other.Next) ) && ( Prev == other.Prev || Prev.Equals(other.Prev) )); }
public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj == this) { return(true); } return(obj is ListWorkweekConfigsRequest other && ((Limit == null && other.Limit == null) || (Limit?.Equals(other.Limit) == true)) && ((Cursor == null && other.Cursor == null) || (Cursor?.Equals(other.Cursor) == true))); }
public bool Equals(MeasurementStandard other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(Name == other.Name && Pollutant == other.Pollutant && Limit.Equals(other.Limit) && Percent.Equals(other.Percent) && Averaging == other.Averaging); }
public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj == this) { return(true); } return(obj is ListBankAccountsRequest other && ((Cursor == null && other.Cursor == null) || (Cursor?.Equals(other.Cursor) == true)) && ((Limit == null && other.Limit == null) || (Limit?.Equals(other.Limit) == true)) && ((LocationId == null && other.LocationId == null) || (LocationId?.Equals(other.LocationId) == true))); }
public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj == this) { return(true); } return(obj is ListEmployeeWagesRequest other && ((EmployeeId == null && other.EmployeeId == null) || (EmployeeId?.Equals(other.EmployeeId) == true)) && ((Limit == null && other.Limit == null) || (Limit?.Equals(other.Limit) == true)) && ((Cursor == null && other.Cursor == null) || (Cursor?.Equals(other.Cursor) == true))); }
public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj == this) { return(true); } return(obj is SearchShiftsRequest other && ((Query == null && other.Query == null) || (Query?.Equals(other.Query) == true)) && ((Limit == null && other.Limit == null) || (Limit?.Equals(other.Limit) == true)) && ((Cursor == null && other.Cursor == null) || (Cursor?.Equals(other.Cursor) == true))); }
public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj == this) { return(true); } return(obj is V1ListOrdersRequest other && ((Order == null && other.Order == null) || (Order?.Equals(other.Order) == true)) && ((Limit == null && other.Limit == null) || (Limit?.Equals(other.Limit) == true)) && ((BatchToken == null && other.BatchToken == null) || (BatchToken?.Equals(other.BatchToken) == true))); }
public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj == this) { return(true); } return(obj is ListTeamMemberBookingProfilesRequest other && ((BookableOnly == null && other.BookableOnly == null) || (BookableOnly?.Equals(other.BookableOnly) == true)) && ((Limit == null && other.Limit == null) || (Limit?.Equals(other.Limit) == true)) && ((Cursor == null && other.Cursor == null) || (Cursor?.Equals(other.Cursor) == true)) && ((LocationId == null && other.LocationId == null) || (LocationId?.Equals(other.LocationId) == true))); }
public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj == this) { return(true); } return(obj is SearchOrdersRequest other && ((LocationIds == null && other.LocationIds == null) || (LocationIds?.Equals(other.LocationIds) == true)) && ((Cursor == null && other.Cursor == null) || (Cursor?.Equals(other.Cursor) == true)) && ((Query == null && other.Query == null) || (Query?.Equals(other.Query) == true)) && ((Limit == null && other.Limit == null) || (Limit?.Equals(other.Limit) == true)) && ((ReturnEntries == null && other.ReturnEntries == null) || (ReturnEntries?.Equals(other.ReturnEntries) == true))); }
public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj == this) { return(true); } return(obj is V1ListSettlementsRequest other && ((Order == null && other.Order == null) || (Order?.Equals(other.Order) == true)) && ((BeginTime == null && other.BeginTime == null) || (BeginTime?.Equals(other.BeginTime) == true)) && ((EndTime == null && other.EndTime == null) || (EndTime?.Equals(other.EndTime) == true)) && ((Limit == null && other.Limit == null) || (Limit?.Equals(other.Limit) == true)) && ((Status == null && other.Status == null) || (Status?.Equals(other.Status) == true)) && ((BatchToken == null && other.BatchToken == null) || (BatchToken?.Equals(other.BatchToken) == true))); }
public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj == this) { return(true); } return(obj is V1ListPaymentsRequest other && ((Order == null && other.Order == null) || (Order?.Equals(other.Order) == true)) && ((BeginTime == null && other.BeginTime == null) || (BeginTime?.Equals(other.BeginTime) == true)) && ((EndTime == null && other.EndTime == null) || (EndTime?.Equals(other.EndTime) == true)) && ((Limit == null && other.Limit == null) || (Limit?.Equals(other.Limit) == true)) && ((BatchToken == null && other.BatchToken == null) || (BatchToken?.Equals(other.BatchToken) == true)) && ((IncludePartial == null && other.IncludePartial == null) || (IncludePartial?.Equals(other.IncludePartial) == true))); }
public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj == this) { return(true); } return(obj is ListCashDrawerShiftsRequest other && ((LocationId == null && other.LocationId == null) || (LocationId?.Equals(other.LocationId) == true)) && ((SortOrder == null && other.SortOrder == null) || (SortOrder?.Equals(other.SortOrder) == true)) && ((BeginTime == null && other.BeginTime == null) || (BeginTime?.Equals(other.BeginTime) == true)) && ((EndTime == null && other.EndTime == null) || (EndTime?.Equals(other.EndTime) == true)) && ((Limit == null && other.Limit == null) || (Limit?.Equals(other.Limit) == true)) && ((Cursor == null && other.Cursor == null) || (Cursor?.Equals(other.Cursor) == true))); }
public void setLimit(SetLimitWindow setLimit) //action for SetLimitWindow { try { Controller.SetLimit(Email, Ordinal, Limit); if (Limit.Equals("-1")) { MessageBox.Show("The limit of this column was disabled"); } else { MessageBox.Show("The limit of this column was set to " + Limit); } setLimit.Close(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj == this) { return(true); } return(obj is V1ListEmployeesRequest other && ((Order == null && other.Order == null) || (Order?.Equals(other.Order) == true)) && ((BeginUpdatedAt == null && other.BeginUpdatedAt == null) || (BeginUpdatedAt?.Equals(other.BeginUpdatedAt) == true)) && ((EndUpdatedAt == null && other.EndUpdatedAt == null) || (EndUpdatedAt?.Equals(other.EndUpdatedAt) == true)) && ((BeginCreatedAt == null && other.BeginCreatedAt == null) || (BeginCreatedAt?.Equals(other.BeginCreatedAt) == true)) && ((EndCreatedAt == null && other.EndCreatedAt == null) || (EndCreatedAt?.Equals(other.EndCreatedAt) == true)) && ((Status == null && other.Status == null) || (Status?.Equals(other.Status) == true)) && ((ExternalId == null && other.ExternalId == null) || (ExternalId?.Equals(other.ExternalId) == true)) && ((Limit == null && other.Limit == null) || (Limit?.Equals(other.Limit) == true)) && ((BatchToken == null && other.BatchToken == null) || (BatchToken?.Equals(other.BatchToken) == true))); }
public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj == this) { return(true); } return(obj is SearchCatalogItemsRequest other && ((TextFilter == null && other.TextFilter == null) || (TextFilter?.Equals(other.TextFilter) == true)) && ((CategoryIds == null && other.CategoryIds == null) || (CategoryIds?.Equals(other.CategoryIds) == true)) && ((StockLevels == null && other.StockLevels == null) || (StockLevels?.Equals(other.StockLevels) == true)) && ((EnabledLocationIds == null && other.EnabledLocationIds == null) || (EnabledLocationIds?.Equals(other.EnabledLocationIds) == true)) && ((Cursor == null && other.Cursor == null) || (Cursor?.Equals(other.Cursor) == true)) && ((Limit == null && other.Limit == null) || (Limit?.Equals(other.Limit) == true)) && ((SortOrder == null && other.SortOrder == null) || (SortOrder?.Equals(other.SortOrder) == true)) && ((ProductTypes == null && other.ProductTypes == null) || (ProductTypes?.Equals(other.ProductTypes) == true)) && ((CustomAttributeFilters == null && other.CustomAttributeFilters == null) || (CustomAttributeFilters?.Equals(other.CustomAttributeFilters) == true))); }
protected bool Equals(StandardEntity other) => Name == other.Name && Pollutant == other.Pollutant && Limit.Equals(other.Limit) && Percent.Equals(other.Percent) && Id == other.Id;