1
0

RequestLineEventArgs.cs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. using System;
  2. namespace OSHttpServer.Parser
  3. {
  4. /// <summary>
  5. /// Used when the request line have been successfully parsed.
  6. /// </summary>
  7. public class RequestLineEventArgs : EventArgs
  8. {
  9. /// <summary>
  10. /// Initializes a new instance of the <see cref="RequestLineEventArgs"/> class.
  11. /// </summary>
  12. /// <param name="httpMethod">The HTTP method.</param>
  13. /// <param name="uriPath">The URI path.</param>
  14. /// <param name="httpVersion">The HTTP version.</param>
  15. public RequestLineEventArgs(string httpMethod, string uriPath, string httpVersion)
  16. {
  17. HttpMethod = httpMethod;
  18. UriPath = uriPath;
  19. HttpVersion = httpVersion;
  20. }
  21. /// <summary>
  22. /// Initializes a new instance of the <see cref="RequestLineEventArgs"/> class.
  23. /// </summary>
  24. public RequestLineEventArgs()
  25. {
  26. }
  27. /// <summary>
  28. /// Gets or sets http method.
  29. /// </summary>
  30. /// <remarks>
  31. /// Should be one of the methods declared in <see cref="Method"/>.
  32. /// </remarks>
  33. public string HttpMethod { get; set; }
  34. /// <summary>
  35. /// Gets or sets the version of the HTTP protocol that the client want to use.
  36. /// </summary>
  37. public string HttpVersion { get; set; }
  38. /// <summary>
  39. /// Gets or sets requested URI path.
  40. /// </summary>
  41. public string UriPath { get; set; }
  42. }
  43. }