Пример #1
0
        public override bool Equals(object other)
        {
            if (object.ReferenceEquals(this, other))
            {
                return(true);
            }

            if (other == null)
            {
                return(false);
            }

            if (GetType() != other.GetType())
            {
                return(false);
            }

            if (GetHashCode() != other.GetHashCode())
            {
                return(false);
            }

            DefaultLabeledKey <K> labeledKey = (DefaultLabeledKey <K>)other;

            if (!object.Equals(_key, labeledKey._key))
            {
                return(false);
            }

            if (!object.Equals(_labels, labeledKey._labels))
            {
                return(false);
            }

            return(true);
        }
Пример #2
0
 protected DefaultAbstractBuilder()
 {
     _labeledKey = NewLabeledKey();
 }