public bool Equals(ILogWriter other) { if (other == null) { return(false); } if (other.IsCollection) { if (other.Count != this.Count) { return(false); } foreach (var w in this._Writers) { if (!other.Any(p => w.Equals(p))) { return(false); } } return(true); } else { return(this._Writers.Count == 1 && this._Writers.First() == other); } }