/// <summary> /// Returns a deep clone of this object. /// </summary> /// <returns></returns> public QuickFilters Clone() { var filters = new QuickFilters(); filters.AddRange(this.Select(x => x.Clone())); return(filters); }
/// <summary> /// Tests if this and the given object are equivalent (i.e. would behave identical, or not). /// </summary> /// <param name="other"></param> /// <returns></returns> public bool IsEquivalent(QuickFilters other) { if (ReferenceEquals(other, objB: null)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } if (Count != other.Count) { return(false); } for (var i = 0; i < Count; ++i) { var filter = this[i]; var otherFilter = other[i]; if (!IsEquivalent(filter, otherFilter)) { return(false); } } return(true); }