public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj == this) { return(true); } ColaConcurrenteReaderWriterLockSlim <T> otra = obj as ColaConcurrenteReaderWriterLockSlim <T>; if (otra == null) { return(false); } lock (lista) return(this.lista.Equals(otra.lista)); }
/// <summary> /// Constructor de copia. /// </summary> /// <param name="cola">Cola a copiar</param> public ColaConcurrenteReaderWriterLockSlim(ColaConcurrenteReaderWriterLockSlim <T> cola) : this() { this.lista = new Lista <T>(cola.lista); }