public override int GetHashCode() { unchecked { int hashCode = (Value != null ? Value.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Label != null ? Label.GetHashCode() : 0); hashCode = (hashCode * 397) ^ LabelColor.GetHashCode(); hashCode = (hashCode * 397) ^ CanEdit.GetHashCode(); hashCode = (hashCode * 397) ^ CanDelete.GetHashCode(); hashCode = (hashCode * 397) ^ Highlight.GetHashCode(); return(hashCode); } }
/// <summary> /// Update the color of a specified label. /// </summary> /// <param name="name"> /// The name of the label to update. /// </param> /// <param name="color"> /// The new color. /// </param> public void UpdateLabelColor(string name, LabelColor color) { CheckLoginStatus(); // Validation if (string.IsNullOrWhiteSpace(name)) { throw new ArgumentNullException("name"); } Core.GetJsonData( Core.ConstructUri( "updateLabelColor?", string.Format("token={0}&name={1}&color={2}", ApiToken, name, color.GetHashCode()), false)); }
public override int GetHashCode() { int hashCode = -419430818; if (Name != null) { hashCode += Name.GetHashCode(); } if (DiscountType != null) { hashCode += DiscountType.GetHashCode(); } if (Percentage != null) { hashCode += Percentage.GetHashCode(); } if (AmountMoney != null) { hashCode += AmountMoney.GetHashCode(); } if (PinRequired != null) { hashCode += PinRequired.GetHashCode(); } if (LabelColor != null) { hashCode += LabelColor.GetHashCode(); } if (ModifyTaxBasis != null) { hashCode += ModifyTaxBasis.GetHashCode(); } return(hashCode); }
public override int GetHashCode() { int hashCode = -268666674; if (Name != null) { hashCode += Name.GetHashCode(); } if (Description != null) { hashCode += Description.GetHashCode(); } if (Abbreviation != null) { hashCode += Abbreviation.GetHashCode(); } if (LabelColor != null) { hashCode += LabelColor.GetHashCode(); } if (AvailableOnline != null) { hashCode += AvailableOnline.GetHashCode(); } if (AvailableForPickup != null) { hashCode += AvailableForPickup.GetHashCode(); } if (AvailableElectronically != null) { hashCode += AvailableElectronically.GetHashCode(); } if (CategoryId != null) { hashCode += CategoryId.GetHashCode(); } if (TaxIds != null) { hashCode += TaxIds.GetHashCode(); } if (ModifierListInfo != null) { hashCode += ModifierListInfo.GetHashCode(); } if (Variations != null) { hashCode += Variations.GetHashCode(); } if (ProductType != null) { hashCode += ProductType.GetHashCode(); } if (SkipModifierScreen != null) { hashCode += SkipModifierScreen.GetHashCode(); } if (ItemOptions != null) { hashCode += ItemOptions.GetHashCode(); } return(hashCode); }
/// <summary> /// Create a new label. /// </summary> /// <param name="labelName"> /// The name of the new label. /// </param> /// <param name="color"> /// The color. /// </param> public void CreateLabel(string labelName, LabelColor color) { this.CheckLoginStatus(); // Validation if (string.IsNullOrWhiteSpace(labelName)) { throw new ArgumentNullException("labelName"); } Core.GetJsonData( Core.ConstructUri( "addLabel?", string.Format("token={0}&name={1}&color={2}", this.apiToken, labelName, color.GetHashCode()), false)); }
/// <summary> /// Create a new label. /// </summary> /// <param name="labelName"> /// The name of the new label. /// </param> /// <param name="color"> /// The color. /// </param> public void CreateLabel(string labelName, LabelColor color) { this.CheckLoginStatus(); // Validation if (string.IsNullOrWhiteSpace(labelName)) { throw new ArgumentNullException("labelName"); } Core.GetJsonData( Core.ConstructUri( "addLabel?", string.Format("token={0}&name={1}&color={2}", this.apiToken, labelName, color.GetHashCode()), false)); }