public virtual bool Equals(ContentItem other) { if (other == null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } if (!IsTransient(this) && !IsTransient(other) && Equals(Id, other.Id)) { var otherType = other.GetUnproxiedType(); var thisType = GetUnproxiedType(); return(thisType.IsAssignableFrom(otherType) || otherType.IsAssignableFrom(thisType)); } return(false); }
public virtual bool Equals(ContentItem other) { if (other == null) return false; if (ReferenceEquals(this, other)) return true; if (!IsTransient(this) && !IsTransient(other) && Equals(Id, other.Id)) { var otherType = other.GetUnproxiedType(); var thisType = GetUnproxiedType(); return thisType.IsAssignableFrom(otherType) || otherType.IsAssignableFrom(thisType); } return false; }