コード例 #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);
            }));
        }
コード例 #2
0
        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));
        }
コード例 #3
0
        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);
            }));
        }
コード例 #4
0
        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));
        }
コード例 #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)));
        }
コード例 #6
0
 public AttributesProjectionExpression(CollectionExpression<PropertyNameExpression> attributes)
 {
     _attributes = attributes;
 }
コード例 #7
0
 public CollectionBinaryExpression(Expression left, CollectionOperator op, CollectionExpression right)
     : base(left, op, right)
 {
 }
コード例 #8
0
 public ProviderPropertiesExpression(CollectionExpression <ProviderPropertyExpression> _providerProps)
 {
     this._providerProps = _providerProps;
 }
コード例 #9
0
 public AttributesProjectionExpression(CollectionExpression <PropertyNameExpression> attributes)
 {
     _attributes = attributes;
 }
コード例 #10
0
 public ProviderPropertiesExpression(CollectionExpression<ProviderPropertyExpression> _providerProps)
 {
     this._providerProps = _providerProps;
 }