Equals() public method

Checks for same reference instead of equivalent DataView or Row. Necessary for ListChanged event handlers to use data structures that use the default to object.Equals(object) instead of object.ReferenceEquals to understand if they need to add a PropertyChanged event handler.
public Equals ( object other ) : bool
other object
return bool
示例#1
0
        public override bool Equals(DataView dv)
        {
            RelatedView other = dv as RelatedView;

            if (other == null)
            {
                return(false);
            }
            if (!base.Equals(dv))
            {
                return(false);
            }
            if (_filterValues != null)
            {
                return(CompareArray(_childKey.ColumnsReference, other._childKey.ColumnsReference) && CompareArray(_filterValues, other._filterValues));
            }
            else
            {
                if (other._filterValues != null)
                {
                    return(false);
                }

                return(CompareArray(_childKey.ColumnsReference, other._childKey.ColumnsReference) &&
                       CompareArray(_parentKey.Value.ColumnsReference, _parentKey.Value.ColumnsReference) &&
                       _parentRowView.Equals(other._parentRowView));
            }
        }