Skip to content

Commit a1d71d7

Browse files
authored
Refcatored the Query to public. (#251)
1 parent 1681812 commit a1d71d7

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Specification/src/Ardalis.Specification/ISpecification.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ namespace Ardalis.Specification
1212
/// <typeparam name="TResult">The type of the result.</typeparam>
1313
public interface ISpecification<T, TResult> : ISpecification<T>
1414
{
15+
ISpecificationBuilder<T, TResult> Query { get; }
16+
1517
/// <summary>
1618
/// The transform function to apply to the <typeparamref name="T"/> element.
1719
/// </summary>
@@ -31,6 +33,8 @@ public interface ISpecification<T, TResult> : ISpecification<T>
3133
/// <typeparam name="T">The type being queried against.</typeparam>
3234
public interface ISpecification<T>
3335
{
36+
ISpecificationBuilder<T> Query { get; }
37+
3438
/// <summary>
3539
/// Arbitrary state to be accessed from builders and evaluators.
3640
/// </summary>

Specification/src/Ardalis.Specification/Specification.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace Ardalis.Specification
77
/// <inheritdoc cref="ISpecification{T, TResult}"/>
88
public abstract class Specification<T, TResult> : Specification<T>, ISpecification<T, TResult>
99
{
10-
protected new virtual ISpecificationBuilder<T, TResult> Query { get; }
10+
public new virtual ISpecificationBuilder<T, TResult> Query { get; }
1111

1212
protected Specification()
1313
: this(InMemorySpecificationEvaluator.Default)
@@ -37,7 +37,7 @@ public abstract class Specification<T> : ISpecification<T>
3737
{
3838
protected IInMemorySpecificationEvaluator Evaluator { get; }
3939
protected ISpecificationValidator Validator { get; }
40-
protected virtual ISpecificationBuilder<T> Query { get; }
40+
public virtual ISpecificationBuilder<T> Query { get; }
4141

4242
protected Specification()
4343
: this(InMemorySpecificationEvaluator.Default, SpecificationValidator.Default)

0 commit comments

Comments
 (0)