Exemplo n.º 1
0
        /**
         * Merges the data on liveness, virtual properties, sorting from the two
         * source lists to the dest list.
         */

        private static ResourceList MergeListData(ResourceList dest, ResourceList source1, ResourceList source2)
        {
            dest.AttachPropertyProviders(source1._propertyProviders);
            dest.AttachPropertyProviders(source2._propertyProviders);
            if (IsSameSort(source1, source2) || source2._lastComparer == null)
            {
                dest._lastComparer = source1._lastComparer;
            }
            else if (source1._lastComparer == null)
            {
                dest._lastComparer = source2._lastComparer;
            }
            return(dest);
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        /**
         * Merges the data on liveness, virtual properties, sorting from the source list
         * into the destination list.
         */

        private static ResourceList MergeListData(ResourceList dest, ResourceList source)
        {
            if (source.IsLive)
            {
                dest._isLive = true;
            }
            dest.AttachPropertyProviders(source._propertyProviders);
            if (dest.LastComparer == null && source.LastComparer != null)
            {
                dest._lastComparer = source._lastComparer;
            }
            return(dest);
        }