mirror of https://github.com/ogoun/Zero.git
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.
26 lines
695 B
26 lines
695 B
using System.Runtime.Serialization;
|
|
|
|
namespace ZeroLevel.Specification
|
|
{
|
|
[DataContract]
|
|
public class OrSpecification<T> : BaseSpecification<T>
|
|
{
|
|
[DataMember]
|
|
private ISpecification<T> leftSpecification;
|
|
|
|
[DataMember]
|
|
private ISpecification<T> rightSpecification;
|
|
|
|
public OrSpecification(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);
|
|
}
|
|
}
|
|
} |