/// <summary> /// Copies formats from another collection. /// </summary> /// <param name="collection">Collection to copy from.</param> public void Assign(FormatCollection collection) { Clear(); foreach (FormatBase format in collection) { Add(format.Clone()); } }
/// <inheritdoc/> public override bool Equals(object obj) { FormatCollection collection = obj as FormatCollection; if (collection == null || Count != collection.Count) { return(false); } for (int i = 0; i < Count; i++) { if (!this[i].Equals(collection[i])) { return(false); } } return(true); }