/// <summary> /// Returns true if ComAdobeGraniteLicenseImplLicenseCheckFilterProperties instances are equal /// </summary> /// <param name="other">Instance of ComAdobeGraniteLicenseImplLicenseCheckFilterProperties to be compared</param> /// <returns>Boolean</returns> public bool Equals(ComAdobeGraniteLicenseImplLicenseCheckFilterProperties other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( CheckInternval == other.CheckInternval || CheckInternval != null && CheckInternval.Equals(other.CheckInternval) ) && ( ExcludeIds == other.ExcludeIds || ExcludeIds != null && ExcludeIds.Equals(other.ExcludeIds) ) && ( EncryptPing == other.EncryptPing || EncryptPing != null && EncryptPing.Equals(other.EncryptPing) )); }
/// <summary> /// 创建查询对象 /// </summary> /// <returns>返回查询对象</returns> public override IQuery CreateQuery() { IQuery query = base.CreateQuery() ?? QueryManager.Create <PermissionGroupEntity>(this); if (LevelOne) { query.And <PermissionGroupEntity>(c => c.Parent <= 0); } if (!Ids.IsNullOrEmpty()) { query.And <PermissionGroupEntity>(c => Ids.Contains(c.Id)); } if (!ExcludeIds.IsNullOrEmpty()) { query.And <PermissionGroupEntity>(c => !ExcludeIds.Contains(c.Id)); } if (!string.IsNullOrWhiteSpace(Name)) { query.And <PermissionGroupEntity>(c => c.Name == Name); } if (Sort.HasValue) { query.And <PermissionGroupEntity>(c => c.Sort == Sort.Value); } if (Parent.HasValue) { query.And <PermissionGroupEntity>(c => c.Parent == Parent.Value); } if (!string.IsNullOrWhiteSpace(Remark)) { query.And <PermissionGroupEntity>(c => c.Remark == Remark); } return(query); }
private void ChooseParent(Parent parent) { if (ExcludeIds.IndexOf(parent.Id) >= 0) { return; } Pipe.SetParameter("parent_result", parent); Finish(); }
/// <summary> /// Serves as a hash function for a particular type. /// </summary> /// <returns>A hash code for the current <see cref="T:System.Object" />.</returns> public override int GetHashCode() { return((Architecture.GetHashCode()) ^ (string.IsNullOrWhiteSpace(CompatibleIds) ? 0 : CompatibleIds.GetHashCode()) ^ (string.IsNullOrWhiteSpace(ExcludeIds) ? 0 : ExcludeIds.GetHashCode()) ^ (string.IsNullOrWhiteSpace(HardwareDescription) ? 0 : HardwareDescription.GetHashCode()) ^ (string.IsNullOrWhiteSpace(HardwareId) ? 0 : HardwareId.GetHashCode()) ^ (string.IsNullOrWhiteSpace(ManufacturerName) ? 0 : ManufacturerName.GetHashCode()) ^ (string.IsNullOrWhiteSpace(ServerName) ? 0 : ServerName.GetHashCode())); }
/// <summary> /// 创建链接按钮。 /// </summary> /// <returns>返回链接按钮实例。</returns> protected TagBuilder CreateAnchor() { var anchor = new TagBuilder("a"); if (Enabled == EnabledMode.Multi) { anchor.MergeAttribute("js-enabled", "1+"); } else if (Enabled == EnabledMode.Single) { anchor.MergeAttribute("js-enabled", "1"); } if (!string.IsNullOrEmpty(Href)) { anchor.MergeAttribute("href", Href); anchor.MergeAttribute("js-mode", "nav"); } else if (!string.IsNullOrWhiteSpace(Action)) { anchor.MergeAttribute("js-mode", "action"); anchor.MergeAttribute("href", Action); } else if (!string.IsNullOrEmpty(Modal)) { anchor.MergeAttribute("href", Modal); anchor.MergeAttribute("js-mode", "modal"); } else { anchor.MergeAttribute("href", "javascript:;"); } if (!string.IsNullOrWhiteSpace(Confirm)) { anchor.MergeAttribute("js-confirm", Confirm); } if (!string.IsNullOrWhiteSpace(ExcludeIds)) { anchor.MergeAttribute("js-excluded", $",{ExcludeIds.Trim()},"); } if (IgnoreChecked) { anchor.MergeAttribute("js-ignore", "checked"); } return(anchor); }
/// <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 (CheckInternval != null) { hashCode = hashCode * 59 + CheckInternval.GetHashCode(); } if (ExcludeIds != null) { hashCode = hashCode * 59 + ExcludeIds.GetHashCode(); } if (EncryptPing != null) { hashCode = hashCode * 59 + EncryptPing.GetHashCode(); } return(hashCode); } }
/// <summary> /// 创建查询对象 /// </summary> /// <returns>返回查询对象</returns> public override IQuery CreateQuery() { var query = base.CreateQuery() ?? QueryManager.Create <RoleEntity>(this); #region 数据筛选 if (!Ids.IsNullOrEmpty()) { query.In <RoleEntity>(c => c.Id, Ids); } if (!ExcludeIds.IsNullOrEmpty()) { query.NotIn <RoleEntity>(c => c.Id, ExcludeIds); } if (!string.IsNullOrWhiteSpace(Name)) { query.Equal <RoleEntity>(c => c.Name, Name); } if (!string.IsNullOrWhiteSpace(NameMateKey)) { query.Like <RoleEntity>(c => c.Name, NameMateKey.Trim()); } if (Status.HasValue) { query.Equal <RoleEntity>(c => c.Status, Status.Value); } if (CreateDate.HasValue) { query.Equal <RoleEntity>(c => c.CreateDate, CreateDate.Value); } if (!string.IsNullOrWhiteSpace(Remark)) { query.Equal <RoleEntity>(c => c.Remark, Remark); } #endregion return(query); }
public Task <Image[]> GetRandomImages([FromBody] ExcludeIds model) { return(this._imagesRepository.GetRandom(5, model.excludeIds)); }