public override int AddRange(TextStyleCollection x) { throw new NotSupportedException("This is a Read Only Collection and can not be modified"); }
internal SyncTextStyleCollection(TextStyleCollection list) { m_root = list.SyncRoot; m_collection = list; }
/// <summary> /// Initializes a new instance of the <c>Enumerator</c> class. /// </summary> /// <param name="tc"></param> internal Enumerator(TextStyleCollection tc) { m_collection = tc; m_index = -1; m_version = tc.m_version; }
internal ReadOnlyTextStyleCollection(TextStyleCollection list) { m_collection = list; }
/// <summary> /// Adds the elements of another <c>TextStyleCollection</c> to the current <c>TextStyleCollection</c>. /// </summary> /// <param name="x">The <c>TextStyleCollection</c> whose elements should be added to the end of the current <c>TextStyleCollection</c>.</param> /// <returns>The new <see cref="TextStyleCollection.Count"/> of the <c>TextStyleCollection</c>.</returns> public virtual int AddRange(TextStyleCollection x) { ++m_version; Grow(x.Count); Array.Copy(x.m_array, 0, m_array, m_count, x.Count); m_count += x.Count; return m_count; }
/// <summary> /// Creates a synchronized (thread-safe) wrapper for a /// <c>TextStyleCollection</c> instance. /// </summary> /// <returns> /// An <c>TextStyleCollection</c> wrapper that is synchronized (thread-safe). /// </returns> public static TextStyleCollection Synchronized(TextStyleCollection list) { if(list==null) throw new ArgumentNullException("list"); return new SyncTextStyleCollection(list); }
/// <summary> /// Creates a read-only wrapper for a /// <c>TextStyleCollection</c> instance. /// </summary> /// <returns> /// An <c>TextStyleCollection</c> wrapper that is read-only. /// </returns> public static TextStyleCollection ReadOnly(TextStyleCollection list) { if(list==null) throw new ArgumentNullException("list"); return new ReadOnlyTextStyleCollection(list); }
/// <summary> /// Initializes a new instance of the <c>TextStyleCollection</c> class /// that contains elements copied from the specified <c>TextStyleCollection</c>. /// </summary> /// <param name="c">The <c>TextStyleCollection</c> whose elements are copied to the new collection.</param> public TextStyleCollection(TextStyleCollection c) { m_array = new TextStyle[c.Count]; AddRange(c); }
public override int AddRange(TextStyleCollection x) { lock(this.m_root) return m_collection.AddRange(x); }