public bool Equals(AbstractTranscoder op) { // If parameter is null return false: if ((object)op == null) { return(false); } // Return true if they match return(Item.Equals(op.Item) && Type == op.Type && Quality == op.Quality); }
public override bool Equals(Object obj) { // If they are the exact same object, return true if (Object.ReferenceEquals(this, obj)) { return(true); } else if (IsDirect) { // If this is a direct transcoder, only use reference equality return(false); } // If parameter is null return false. if ((object)obj == null) { return(false); } // If the types don't match exactly, return false if (this.GetType() != obj.GetType()) { return(false); } // If parameter cannot be cast to AbstractTranscoder return false. AbstractTranscoder op = obj as AbstractTranscoder; if ((object)op == null) { return(false); } // Return true if the fields match: return(Equals(op)); }
public bool Equals(AbstractTranscoder op) { // If parameter is null return false: if ((object)op == null) { return false; } // Return true if they match return Item.Equals(op.Item) && Type == op.Type && Quality == op.Quality; }