/// <summary> /// Creates a read-only wrapper for a /// <c>Vector3List</c> instance. /// </summary> /// <returns> /// An <c>Vector3List</c> wrapper that is read-only. /// </returns> public static Vector3List ReadOnly(Vector3List list) { if (list == null) { throw new ArgumentNullException("list"); } return(new ReadOnlyVector3List(list)); }
private int m_version; // defaults to 0 #endregion #region Static Wrappers /// <summary> /// Creates a synchronized (thread-safe) wrapper for a /// <c>Vector3List</c> instance. /// </summary> /// <returns> /// An <c>Vector3List</c> wrapper that is synchronized (thread-safe). /// </returns> public static Vector3List Synchronized(Vector3List list) { if (list == null) { throw new ArgumentNullException("list"); } return(new SyncVector3List(list)); }
/// <summary> /// Creates a shallow copy of the <see cref="Vector3List"/>. /// </summary> virtual public object Clone() { Vector3List newColl = new Vector3List(m_count); Array.Copy(m_array, 0, newColl.m_array, 0, m_count); newColl.m_count = m_count; newColl.m_version = m_version; return(newColl); }
/// <summary> /// Adds the elements of another <c>Vector3List</c> to the current <c>Vector3List</c>. /// </summary> /// <param name="x">The <c>Vector3List</c> whose elements should be added to the end of the current <c>Vector3List</c>.</param> /// <returns>The new <see cref="Vector3List.Count"/> of the <c>Vector3List</c>.</returns> virtual public int AddRange(Vector3List x) { if (m_count + x.Count >= m_array.Length) { EnsureCapacity(m_count + x.Count); } Array.Copy(x.m_array, 0, m_array, m_count, x.Count); m_count += x.Count; m_version++; return(m_count); }
internal ReadOnlyVector3List(Vector3List list) : base(Tag.Default) { m_collection = list; }
public override int AddRange(Vector3List x) { lock (this.m_root) return(m_collection.AddRange(x)); }
internal SyncVector3List(Vector3List list) : base(Tag.Default) { 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(Vector3List tc) { m_collection = tc; m_index = -1; m_version = tc.m_version; }
/// <summary> /// Initializes a new instance of the <c>Vector3List</c> class /// that contains elements copied from the specified <c>Vector3List</c>. /// </summary> /// <param name="c">The <c>Vector3List</c> whose elements are copied to the new collection.</param> public Vector3List(Vector3List c) { m_array = new Vector3[c.Count]; AddRange(c); }
public override int AddRange(Vector3List x) { throw new NotSupportedException("This is a Read Only Collection and can not be modified"); }