public override int GetHashCode() { unchecked { var hashCode = ContractID; hashCode = (hashCode * 397) ^ (ContractName != null ? ContractName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ CustomerID; hashCode = (hashCode * 397) ^ (CustomerName != null ? CustomerName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (ContractType != null ? ContractType.GetHashCode() : 0); hashCode = (hashCode * 397) ^ Active.GetHashCode(); hashCode = (hashCode * 397) ^ Default.GetHashCode(); hashCode = (hashCode * 397) ^ Taxable.GetHashCode(); hashCode = (hashCode * 397) ^ StartDate.GetHashCode(); hashCode = (hashCode * 397) ^ EndDate.GetHashCode(); hashCode = (hashCode * 397) ^ (RetainerFlatFeeContract != null ? RetainerFlatFeeContract.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (HourlyContract != null ? HourlyContract.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (BlockHoursContract != null ? BlockHoursContract.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (BlockMoneyContract != null ? BlockMoneyContract.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (RemoteMonitoringContract != null ? RemoteMonitoringContract.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (OnlineBackupContract != null ? OnlineBackupContract.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (ProjectOneTimeFeeContract != null ? ProjectOneTimeFeeContract.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (ProjectHourlyRateContract != null ? ProjectHourlyRateContract.GetHashCode() : 0); return(hashCode); } }
public override int GetHashCode() { unchecked { return((ContractType.GetHashCode() * 397) ^ (ConfigurationName?.GetHashCode() ?? 0)); } }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; // Suitable nullity checks etc, of course :) if (StaffGroup != null) { hashCode = hashCode * 59 + StaffGroup.GetHashCode(); } if (Grade != null) { hashCode = hashCode * 59 + Grade.GetHashCode(); } if (_Contract != null) { hashCode = hashCode * 59 + _Contract.GetHashCode(); } if (Payscale != null) { hashCode = hashCode * 59 + Payscale.GetHashCode(); } if (ContractType != null) { hashCode = hashCode * 59 + ContractType.GetHashCode(); } if (ContractedTime != null) { hashCode = hashCode * 59 + ContractedTime.GetHashCode(); } if (DefaultUnavailabilityHours != null) { hashCode = hashCode * 59 + DefaultUnavailabilityHours.GetHashCode(); } hashCode = hashCode * 59 + WtdOptOut.GetHashCode(); if (SalaryFrequency != null) { hashCode = hashCode * 59 + SalaryFrequency.GetHashCode(); } hashCode = hashCode * 59 + SalaryAmount.GetHashCode(); return(hashCode); } }
public override int GetHashCode() { return(ContractType.GetHashCode()); }
public Dictionary <string, object> ToDictionary() { Dictionary <string, object> result = new Dictionary <string, object>(); result["workID"] = workID; result["contractType"] = contractType.GetHashCode(); result["scaleType"] = scaleType.GetHashCode(); Dictionary <string, object> result_genreDatas = new Dictionary <string, object>(); for (int i = 0; i < genreDatas.Count; i++) { result_genreDatas.Add(i + "", genreDatas[i].ToDictionary()); } result["genreDatas"] = result_genreDatas; Dictionary <string, object> result_themeDatas = new Dictionary <string, object>(); for (int i = 0; i < themeDatas.Count; i++) { result_themeDatas.Add(i + "", themeDatas[i].ToDictionary()); } result["themeDatas"] = result_themeDatas; Dictionary <string, object> result_cameraDatas = new Dictionary <string, object>(); for (int i = 0; i < cameraDatas.Count; i++) { result_cameraDatas.Add(i + "", cameraDatas[i].ToDictionary()); } result["cameraDatas"] = result_cameraDatas; Dictionary <string, object> result_graphicDatas = new Dictionary <string, object>(); for (int i = 0; i < graphicDatas.Count; i++) { result_graphicDatas.Add(i + "", graphicDatas[i].ToDictionary()); } result["graphicDatas"] = result_graphicDatas; Dictionary <string, object> result_platformDatas = new Dictionary <string, object>(); for (int i = 0; i < platformDatas.Count; i++) { result_platformDatas.Add(i + "", platformDatas[i].ToDictionary()); } result["platformDatas"] = result_platformDatas; Dictionary <string, object> result_featureDatas = new Dictionary <string, object>(); for (int i = 0; i < featureDatas.Count; i++) { result_featureDatas.Add(i + "", featureDatas[i].ToDictionary()); } result["featureDatas"] = result_featureDatas; result["dueDate"] = dueDate.ToDictionary(); result["reward"] = reward.ToDictionary(); result["fine"] = fine.ToDictionary(); Dictionary <string, object> result_employee_Worker = new Dictionary <string, object>(); for (int i = 0; i < employee_Worker.Count; i++) { result_employee_Worker.Add(i + "", employee_Worker[i]); } result["employee_Worker"] = result_employee_Worker; result["processCurrent"] = processCurrent; result["processMax"] = processMax; result["contractStatus"] = contractStatus.GetHashCode(); return(result); }