diff --git a/Specification/src/Ardalis.Specification/ISpecification.cs b/Specification/src/Ardalis.Specification/ISpecification.cs index 9a57af04..ba92eff7 100644 --- a/Specification/src/Ardalis.Specification/ISpecification.cs +++ b/Specification/src/Ardalis.Specification/ISpecification.cs @@ -31,6 +31,11 @@ public interface ISpecification : ISpecification /// The type being queried against. public interface ISpecification { + /// + /// Arbitrary state to be accessed from builders and evaluators. + /// + IDictionary Items { get; set; } + /// /// The collection of filters. /// diff --git a/Specification/src/Ardalis.Specification/Specification.cs b/Specification/src/Ardalis.Specification/Specification.cs index d32dc03b..0e414367 100644 --- a/Specification/src/Ardalis.Specification/Specification.cs +++ b/Specification/src/Ardalis.Specification/Specification.cs @@ -73,6 +73,9 @@ public virtual bool IsSatisfiedBy(T entity) return Validator.IsValid(entity, this); } + /// + public IDictionary Items { get; set; } = new Dictionary(); + /// public IEnumerable> WhereExpressions { get; } = new List>();