ISpecificationParser.cs 902 B

12345678910111213141516171819
  1. namespace Abp.Specifications
  2. {
  3. /// <summary>
  4. /// Represents that the implemented classes are specification parsers that
  5. /// parses the given specification to a domain specific criteria object, such
  6. /// as the <c>ICriteria</c> instance in NHibernate.
  7. /// </summary>
  8. /// <typeparam name="TCriteria">The type of the domain specific criteria.</typeparam>
  9. public interface ISpecificationParser<TCriteria>
  10. {
  11. /// <summary>
  12. /// Parses the given specification to a domain specific criteria object.
  13. /// </summary>
  14. /// <typeparam name="T">The type of the object to which the specification is applied.</typeparam>
  15. /// <param name="specification">The specified specification instance.</param>
  16. /// <returns>The instance of the domain specific criteria.</returns>
  17. TCriteria Parse<T>(ISpecification<T> specification);
  18. }
  19. }