IRequestInfo.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. namespace SuperSocket.SocketBase.Protocol
  6. {
  7. /// <summary>
  8. /// Request information interface
  9. /// </summary>
  10. public interface IRequestInfo
  11. {
  12. /// <summary>
  13. /// Gets the key of this request.
  14. /// </summary>
  15. string Key { get; }
  16. }
  17. /// <summary>
  18. /// Request information interface
  19. /// </summary>
  20. /// <typeparam name="TRequestBody">The type of the request body.</typeparam>
  21. public interface IRequestInfo<TRequestBody> : IRequestInfo
  22. {
  23. /// <summary>
  24. /// Gets the body of this request.
  25. /// </summary>
  26. TRequestBody Body { get; }
  27. }
  28. /// <summary>
  29. /// Request information interface
  30. /// </summary>
  31. /// <typeparam name="TRequestHeader">The type of the request header.</typeparam>
  32. /// <typeparam name="TRequestBody">The type of the request body.</typeparam>
  33. public interface IRequestInfo<TRequestHeader, TRequestBody> : IRequestInfo<TRequestBody>
  34. {
  35. /// <summary>
  36. /// Gets the header of the request.
  37. /// </summary>
  38. TRequestHeader Header { get; }
  39. }
  40. }