Esempio n. 1
0
        public override Boolean Contains(Expression other)
        {
            CollectionExpression ce = other as CollectionExpression;

            return(ce != null &&
                   Enumerable.All(Caster.Cast <object>(_collection), delegate(Object item)
            {
                return Enumerable.Contains(Caster.Cast <object>(ce._collection), item);
            }));
        }
        public override Boolean Equals(Expression other)
        {
            CollectionExpression <TValue> ce = other as CollectionExpression <TValue>;

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

            IEnumerable <TValue> otherCollection = ce.Collection;

            return(Enumerable.SequenceEqual(Collection, otherCollection, _comparer));
        }
        public override Boolean Contains(Expression other)
        {
            CollectionExpression <TValue> ce = other as CollectionExpression <TValue>;

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

            IEnumerable <TValue> collection = ce.Collection;

            return(Enumerable.All <TValue>(collection, delegate(TValue item)
            {
                return Enumerable.Contains <TValue>(collection, item, _comparer);
            }));
        }
        protected override BinaryExpressionBase <CollectionOperator> Create(Expression left,
                                                                            CollectionOperator op,
                                                                            Expression right)
        {
            if (right == null)
            {
                throw new ArgumentNullException("right");
            }

            CollectionExpression ce = right as CollectionExpression;

            if (ce == null)
            {
                throw new ArgumentException("Parameter must be a CollectionExpression instance.",
                                            "right");
            }

            return(new CollectionBinaryExpression(left, op, ce));
        }
Esempio n. 5
0
        public override Boolean Equals(Expression other)
        {
            CollectionExpression ce = other as CollectionExpression;

            return(ce != null && Enumerable.SequenceEqual(Caster.Cast <object>(_collection), Caster.Cast <object>(ce._collection)));
        }
 public AttributesProjectionExpression(CollectionExpression<PropertyNameExpression> attributes)
 {
     _attributes = attributes;
 }
 public CollectionBinaryExpression(Expression left, CollectionOperator op, CollectionExpression right)
     : base(left, op, right)
 {
 }
Esempio n. 8
0
 public ProviderPropertiesExpression(CollectionExpression <ProviderPropertyExpression> _providerProps)
 {
     this._providerProps = _providerProps;
 }
 public AttributesProjectionExpression(CollectionExpression <PropertyNameExpression> attributes)
 {
     _attributes = attributes;
 }
 public ProviderPropertiesExpression(CollectionExpression<ProviderPropertyExpression> _providerProps)
 {
     this._providerProps = _providerProps;
 }