You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
961 B

3 years ago
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. namespace Apewer.Web
  5. {
  6. /// <summary>上下文。</summary>
  7. public class MiniContext
  8. {
  9. MiniConnection _connection;
  10. MiniRequest _request;
  11. MiniResponse _response;
  12. MiniServer _server;
  13. internal MiniContext(MiniConnection connection)
  14. {
  15. _connection = connection;
  16. _server = connection.Server;
  17. _request = new MiniRequest(this);
  18. _response = new MiniResponse(this);
  19. }
  20. /// <summary>服务器。</summary>
  21. public MiniServer Server { get => _server; }
  22. /// <summary>连接。</summary>
  23. public MiniConnection Connection { get => _connection; }
  24. /// <summary>请求。</summary>
  25. public MiniRequest Request { get => _request; }
  26. /// <summary>响应。</summary>
  27. public MiniResponse Response { get => _response; }
  28. }
  29. }