You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Zero/ZeroLevel/Services/Specification/AndSpecification.cs

28 lines
730 B

6 years ago
using System;
using System.Runtime.Serialization;
namespace ZeroLevel.Specification
{
[Serializable]
[DataContract]
public class AndSpecification<T> : BaseSpecification<T>
{
[DataMember]
private ISpecification<T> leftSpecification;
6 years ago
[DataMember]
private ISpecification<T> rightSpecification;
6 years ago
public AndSpecification(ISpecification<T> left, ISpecification<T> right)
{
this.leftSpecification = left;
this.rightSpecification = right;
}
public override bool IsSatisfiedBy(T o)
{
return this.leftSpecification.IsSatisfiedBy(o)
&& this.rightSpecification.IsSatisfiedBy(o);
}
}
}

Powered by TurnKey Linux.