示例#1
0
        public override bool Equals( object obj )
        {
            if ( obj == null || !(obj is MinusPredicate) )
                return false;

            MinusPredicate rhs = (MinusPredicate) obj;
            return rhs._lhs.Equals( _lhs ) && rhs._rhs.Equals( _rhs );
        }
示例#2
0
文件: ResourceList.cs 项目: mo5h/omeo
        public IResourceList Minus(IResourceList other)
        {
            if (other == null)
            {
                return(this);
            }

            ResourceList   otherList = (ResourceList)other;
            MinusPredicate pred      = new MinusPredicate(
                _predicate, otherList._predicate);

            ResourceList result = new ResourceList(pred, _isLive || otherList.IsLive);

            result.AttachPropertyProviders(_propertyProviders);
            result.AttachPropertyProviders(otherList._propertyProviders);
            if (_lastComparer != null)
            {
                result._lastComparer = _lastComparer;
            }
            return(result);
        }