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/BaseSpecification.cs

27 lines
677 B

using System;
using System.Runtime.Serialization;
namespace ZeroLevel.Specification
{
[Serializable]
[DataContract]
public abstract class BaseSpecification<T> : ISpecification<T>
{
public abstract bool IsSatisfiedBy(T o);
public ISpecification<T> And(ISpecification<T> specification)
{
return new AndSpecification<T>(this, specification);
}
public ISpecification<T> Or(ISpecification<T> specification)
{
return new OrSpecification<T>(this, specification);
}
public ISpecification<T> Not()
{
return new NotSpecification<T>(this);
}
}
}

Powered by TurnKey Linux.