/// <summary> /// Returns true if ItemExtraOption instances are equal /// </summary> /// <param name="input">Instance of ItemExtraOption to be compared</param> /// <returns>Boolean</returns> public bool Equals(ItemExtraOption input) { if (input == null) { return(false); } return (( Name == input.Name || Name != null && Name.Equals(input.Name) ) && ( Description == input.Description || Description != null && Description.Equals(input.Description) ) && ( MerchantSuppliedId == input.MerchantSuppliedId || MerchantSuppliedId != null && MerchantSuppliedId.Equals(input.MerchantSuppliedId) ) && ( Active == input.Active || Active != null && Active.Equals(input.Active) ) && ( Price == input.Price || Price != null && Price.Equals(input.Price) ) && ( BasePrice == input.BasePrice || BasePrice != null && BasePrice.Equals(input.BasePrice) ) && ( Default == input.Default || Default != null && Default.Equals(input.Default) ) && ( SortId == input.SortId || SortId != null && SortId.Equals(input.SortId) ) && ( TaxRate == input.TaxRate || TaxRate != null && TaxRate.Equals(input.TaxRate) ) && ( Extras == input.Extras || Extras != null && Extras.SequenceEqual(input.Extras) )); }
public bool Equals(Pizza other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(Id.Equals(other.Id) && string.Equals(Name, other.Name) && string.Equals(Description, other.Description) && BasePrice.Equals(other.BasePrice) && Toppings.OrderlessSequenceEquals(other.Toppings)); }
/// <summary> /// Returns true if Item instances are equal /// </summary> /// <param name="input">Instance of Item to be compared</param> /// <returns>Boolean</returns> public bool Equals(Item input) { if (input == null) { return(false); } return (( Name == input.Name || Name != null && Name.Equals(input.Name) ) && ( Description == input.Description || Description != null && Description.Equals(input.Description) ) && ( MerchantSuppliedId == input.MerchantSuppliedId || MerchantSuppliedId != null && MerchantSuppliedId.Equals(input.MerchantSuppliedId) ) && ( Active == input.Active || Active != null && Active.Equals(input.Active) ) && ( IsAlcohol == input.IsAlcohol || IsAlcohol != null && IsAlcohol.Equals(input.IsAlcohol) ) && ( IsBikeFriendly == input.IsBikeFriendly || IsBikeFriendly != null && IsBikeFriendly.Equals(input.IsBikeFriendly) ) && ( SortId == input.SortId || SortId != null && SortId.Equals(input.SortId) ) && ( Price == input.Price || Price != null && Price.Equals(input.Price) ) && ( BasePrice == input.BasePrice || BasePrice != null && BasePrice.Equals(input.BasePrice) ) && ( Extras == input.Extras || Extras != null && Extras.SequenceEqual(input.Extras) ) && ( TaxRate == input.TaxRate || TaxRate != null && TaxRate.Equals(input.TaxRate) ) && ( OriginalImageUrl == input.OriginalImageUrl || OriginalImageUrl != null && OriginalImageUrl.Equals(input.OriginalImageUrl) )); }