Skip to content

Commit

Permalink
Refactor specification constructors as public.
Browse files Browse the repository at this point in the history
  • Loading branch information
fiseni committed Dec 20, 2024
1 parent 4e54413 commit 0415714
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Specification/src/Ardalis.Specification/Specification.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ public class Specification<T, TResult> : Specification<T>, ISpecification<T, TRe
{
public new virtual ISpecificationBuilder<T, TResult> Query { get; }

protected Specification()
public Specification()
: this(InMemorySpecificationEvaluator.Default)
{
}

protected Specification(IInMemorySpecificationEvaluator inMemorySpecificationEvaluator)
public Specification(IInMemorySpecificationEvaluator inMemorySpecificationEvaluator)
: base(inMemorySpecificationEvaluator)
{
Query = new SpecificationBuilder<T, TResult>(this);
Expand Down Expand Up @@ -42,22 +42,22 @@ public class Specification<T> : ISpecification<T>
protected ISpecificationValidator Validator { get; }
public virtual ISpecificationBuilder<T> Query { get; }

protected Specification()
public Specification()
: this(InMemorySpecificationEvaluator.Default, SpecificationValidator.Default)
{
}

protected Specification(IInMemorySpecificationEvaluator inMemorySpecificationEvaluator)
public Specification(IInMemorySpecificationEvaluator inMemorySpecificationEvaluator)
: this(inMemorySpecificationEvaluator, SpecificationValidator.Default)
{
}

protected Specification(ISpecificationValidator specificationValidator)
public Specification(ISpecificationValidator specificationValidator)
: this(InMemorySpecificationEvaluator.Default, specificationValidator)
{
}

protected Specification(IInMemorySpecificationEvaluator inMemorySpecificationEvaluator, ISpecificationValidator specificationValidator)
public Specification(IInMemorySpecificationEvaluator inMemorySpecificationEvaluator, ISpecificationValidator specificationValidator)
{
Evaluator = inMemorySpecificationEvaluator;
Validator = specificationValidator;
Expand Down

0 comments on commit 0415714

Please sign in to comment.