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.
22 lines
494 B
22 lines
494 B
using System.Runtime.Serialization;
|
|
|
|
namespace ZeroLevel.Specification
|
|
{
|
|
[DataContract]
|
|
public class NotSpecification<T> : BaseSpecification<T>
|
|
{
|
|
[DataMember]
|
|
ISpecification<T> _specification;
|
|
|
|
public NotSpecification(ISpecification<T> specification)
|
|
{
|
|
this._specification = specification;
|
|
}
|
|
|
|
public override bool IsSatisfiedBy(T o)
|
|
{
|
|
return !this._specification.IsSatisfiedBy(o);
|
|
}
|
|
}
|
|
}
|