Ejemplo n.º 1
0
 /// <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());
     }
 }
Ejemplo n.º 2
0
        /// <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);
        }