BlackListData UR2BLD(UserRanking ur) { BlackListData bd = new BlackListData(); bd.UserID = ur.UserID; bd.UserName = ur.UserName; bd.Score = ur.Score; return(bd); }
BlackListData UR2BLD(GameUser gu) { BlackListData bd = new BlackListData(); bd.UserID = gu.UserId; bd.UserName = gu.NickName; bd.Score = gu.Score; bd.Identify = gu.Identify; bd.CreateDate = System.DateTime.Now; return(bd); }
int checkBlack() { //01 blacklist var blackCache = new ShareCacheStruct <BlackListData>(); BlackListData blackD = blackCache.Find((o) => { return(o.Identify == requestPack.Identify); }); if (null != blackD) { return((int)ErrorCodeEx.DataCheck_BlackList); } return((int)ErrorCodeEx.None); }
void doAdd_delByIndex(string parm) { string[] p = parm.Split(','); int rankingIndex = int.Parse(p[0]) - 1; UserRanking ur = RankingFactorNew.Singleton().getRankingData <UserRanking, RankingScore>(rankingIndex); if (null != ur) { var cache = new ShareCacheStruct <UserRanking>(); cache.Delete(ur); var cachePersonal = new PersonalCacheStruct <GameUser>(); GameUser gu = cachePersonal.FindKey(ur.UserID.ToString()); var black = new ShareCacheStruct <BlackListData>(); BlackListData bld = UR2BLD(gu); black.AddOrUpdate(bld); } processSort("ranking"); }
/// <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 (AddressesAreIdentical != null) { hashCode = hashCode * 59 + AddressesAreIdentical.GetHashCode(); } if (BlackListData != null) { hashCode = hashCode * 59 + BlackListData.GetHashCode(); } if (CardOwnerAddress != null) { hashCode = hashCode * 59 + CardOwnerAddress.GetHashCode(); } if (CustomerIpAddress != null) { hashCode = hashCode * 59 + CustomerIpAddress.GetHashCode(); } if (DefaultFormFill != null) { hashCode = hashCode * 59 + DefaultFormFill.GetHashCode(); } if (DeviceFingerprintActivated != null) { hashCode = hashCode * 59 + DeviceFingerprintActivated.GetHashCode(); } if (DeviceFingerprintTransactionId != null) { hashCode = hashCode * 59 + DeviceFingerprintTransactionId.GetHashCode(); } if (GiftCardType != null) { hashCode = hashCode * 59 + GiftCardType.GetHashCode(); } if (GiftMessage != null) { hashCode = hashCode * 59 + GiftMessage.GetHashCode(); } if (HasForgottenPwd != null) { hashCode = hashCode * 59 + HasForgottenPwd.GetHashCode(); } if (HasPassword != null) { hashCode = hashCode * 59 + HasPassword.GetHashCode(); } if (IsPreviousCustomer != null) { hashCode = hashCode * 59 + IsPreviousCustomer.GetHashCode(); } if (OrderTimezone != null) { hashCode = hashCode * 59 + OrderTimezone.GetHashCode(); } if (ShipComments != null) { hashCode = hashCode * 59 + ShipComments.GetHashCode(); } if (ShipmentTrackingNumber != null) { hashCode = hashCode * 59 + ShipmentTrackingNumber.GetHashCode(); } if (ShippingDetails != null) { hashCode = hashCode * 59 + ShippingDetails.GetHashCode(); } if (UserData != null) { hashCode = hashCode * 59 + UserData.GetHashCode(); } if (Website != null) { hashCode = hashCode * 59 + Website.GetHashCode(); } return(hashCode); } }
/// <summary> /// Returns true if FraudFields instances are equal /// </summary> /// <param name="other">Instance of FraudFields to be compared</param> /// <returns>Boolean</returns> public bool Equals(FraudFields other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( AddressesAreIdentical == other.AddressesAreIdentical || AddressesAreIdentical != null && AddressesAreIdentical.Equals(other.AddressesAreIdentical) ) && ( BlackListData == other.BlackListData || BlackListData != null && BlackListData.Equals(other.BlackListData) ) && ( CardOwnerAddress == other.CardOwnerAddress || CardOwnerAddress != null && CardOwnerAddress.Equals(other.CardOwnerAddress) ) && ( CustomerIpAddress == other.CustomerIpAddress || CustomerIpAddress != null && CustomerIpAddress.Equals(other.CustomerIpAddress) ) && ( DefaultFormFill == other.DefaultFormFill || DefaultFormFill != null && DefaultFormFill.Equals(other.DefaultFormFill) ) && ( DeviceFingerprintActivated == other.DeviceFingerprintActivated || DeviceFingerprintActivated != null && DeviceFingerprintActivated.Equals(other.DeviceFingerprintActivated) ) && ( DeviceFingerprintTransactionId == other.DeviceFingerprintTransactionId || DeviceFingerprintTransactionId != null && DeviceFingerprintTransactionId.Equals(other.DeviceFingerprintTransactionId) ) && ( GiftCardType == other.GiftCardType || GiftCardType != null && GiftCardType.Equals(other.GiftCardType) ) && ( GiftMessage == other.GiftMessage || GiftMessage != null && GiftMessage.Equals(other.GiftMessage) ) && ( HasForgottenPwd == other.HasForgottenPwd || HasForgottenPwd != null && HasForgottenPwd.Equals(other.HasForgottenPwd) ) && ( HasPassword == other.HasPassword || HasPassword != null && HasPassword.Equals(other.HasPassword) ) && ( IsPreviousCustomer == other.IsPreviousCustomer || IsPreviousCustomer != null && IsPreviousCustomer.Equals(other.IsPreviousCustomer) ) && ( OrderTimezone == other.OrderTimezone || OrderTimezone != null && OrderTimezone.Equals(other.OrderTimezone) ) && ( ShipComments == other.ShipComments || ShipComments != null && ShipComments.Equals(other.ShipComments) ) && ( ShipmentTrackingNumber == other.ShipmentTrackingNumber || ShipmentTrackingNumber != null && ShipmentTrackingNumber.Equals(other.ShipmentTrackingNumber) ) && ( ShippingDetails == other.ShippingDetails || ShippingDetails != null && ShippingDetails.Equals(other.ShippingDetails) ) && ( UserData == other.UserData || UserData != null && UserData.SequenceEqual(other.UserData) ) && ( Website == other.Website || Website != null && Website.Equals(other.Website) )); }