Exemple #1
0
        public override bool Equals(object o)
        {
            if (this == o)
            {
                return(true);
            }
            if (o == null || GetType() != o.GetType())
            {
                return(false);
            }

            ValuedDataObject otherObject = (ValuedDataObject)o;

            if (!otherObject.ItemSubjectRef.StructureRef.Equals(this.ItemSubjectRef.StructureRef))
            {
                return(false);
            }
            if (!otherObject.Id.Equals(this.Id))
            {
                return(false);
            }
            if (!otherObject.Name.Equals(this.Name))
            {
                return(false);
            }
            if (otherObject.GetValue() == null || this.value == null || (!otherObject.GetValue().Equals(this.value.ToString())))
            {
                return(false);
            }

            return(true);
        }
Exemple #2
0
        //public abstract ValuedDataObject Clone();

        public void SetValues(ValuedDataObject otherElement)
        {
            base.SetValues(otherElement);
            if (otherElement.GetValue() != null)
            {
                SetValue(otherElement.GetValue());
            }
        }