Example #1
0
 /// <inheritdoc />
 public NotSpecification(ISpecificationAlgebra <T> algebra, ISpecification <T> argument)
     : base(
         algebra.GetHighestPrioritizedAlgebra <Specification <T>, ISpecificationAlgebra <T> >((argument as IDefineAlgebraicDomain <Specification <T>, ISpecificationAlgebra <T> >)?.Algebra),
         null)
 {
     _argument = argument;
 }
Example #2
0
 /// <summary>Initializes a new instance of the <see cref="CompositeSpecification{T}"/> class.</summary>
 /// <param name="algebra">The algebra.</param>
 /// <param name="operation">The operator.</param>
 /// <param name="arguments">The arguments.</param>
 public CompositeSpecification(ISpecificationAlgebra <T> algebra,
                               CompositeSpecificationOperation operation,
                               params ISpecification <T>[] arguments
                               )
     : base(algebra.GetHighestPrioritizedAlgebra <Specification <T>, ISpecificationAlgebra <T> >(arguments.OfType <IDefineAlgebraicDomain <Specification <T>, ISpecificationAlgebra <T> > >().Select(a => a.Algebra)), null)
 {
     Operation  = operation;
     _arguments = GetFlatArgumentsArray(operation, arguments);
 }