IQueryHandler.cs 704 B

123456789101112131415161718192021222324252627282930
  1. using System;
  2. namespace Blue
  3. {
  4. /// <summary>
  5. /// 查询句柄的接口
  6. /// 同步+异步查询
  7. /// </summary>
  8. public interface IQueryHandler
  9. {
  10. /// <summary>
  11. /// 同步查询
  12. /// </summary>
  13. R DoQuery<Q,R>() where Q:IQuery<R>,new();
  14. /// <summary>
  15. /// 同步查询
  16. /// </summary>
  17. R DoQuery<R>(IQuery<R> query);
  18. /// <summary>
  19. /// 异步查询
  20. /// </summary>
  21. IQueryResult<R> DoQueryAsync<R>(IQuery<R> query);
  22. /// <summary>
  23. /// 异步查询
  24. /// </summary>
  25. IQueryResult<R> DoQueryAsync<Q,R>() where Q:IQuery<R>,new();
  26. }
  27. }