using Deltares.Standard.Specifications; namespace Deltares.Dam.Data { public abstract class CompositeSpecification : SpecificationBase { #region Operator overloads /// /// Implements the operator true. /// /// The specification. /// /// The result of the operator. /// public static bool operator true(CompositeSpecification specification) { return false; } /// /// Implements the operator false. /// /// The specification. /// /// The result of the operator. /// public static bool operator false(CompositeSpecification specification) { return false; } /// /// Implements the operator &. /// /// The left. /// The right. /// /// The result of the operator. /// public static CompositeSpecification operator &(CompositeSpecification left, CompositeSpecification right) { return new AndSpecification(left, right); } /// /// Ands the specified other. /// /// The other. /// public CompositeSpecification And(ISpecification other) { return new AndSpecification(this, other); } /// /// Implements the operator |. /// /// The left. /// The right. /// /// The result of the operator. /// public static CompositeSpecification operator |(CompositeSpecification left, CompositeSpecification right) { return new AndSpecification(left, right); } public OrSpecification Or(ISpecification other) { return new OrSpecification(this, other); } /// /// Implements the operator !. /// /// The specification. /// /// The result of the operator. /// public static CompositeSpecification operator !(CompositeSpecification specification) { return new NotSpecification(specification); } /// /// Nots this instance. /// /// public NotSpecification Not() { return new NotSpecification(this); } #endregion } }