Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Specification/src/Ardalis.Specification/ISpecification.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ public interface ISpecification<T, TResult> : ISpecification<T>
/// <typeparam name="T">The type being queried against.</typeparam>
public interface ISpecification<T>
{
/// <summary>
/// Arbitrary state to be accessed from builders and evaluators.
/// </summary>
IDictionary<string, object> Items { get; set; }

/// <summary>
/// The collection of filters.
/// </summary>
Expand Down
3 changes: 3 additions & 0 deletions Specification/src/Ardalis.Specification/Specification.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ public virtual bool IsSatisfiedBy(T entity)
return Validator.IsValid(entity, this);
}

/// <inheritdoc/>
public IDictionary<string, object> Items { get; set; } = new Dictionary<string, object>();

/// <inheritdoc/>
public IEnumerable<WhereExpressionInfo<T>> WhereExpressions { get; } = new List<WhereExpressionInfo<T>>();

Expand Down