暫無描述
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.

NavigationEntry.cs 3.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. // Copyright © 2016 The CefSharp Authors. All rights reserved.
  2. //
  3. // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
  4. using System;
  5. namespace CefSharp
  6. {
  7. /// <summary>
  8. /// Represents an entry in navigation history.
  9. /// </summary>
  10. public sealed class NavigationEntry
  11. {
  12. /// <summary>
  13. /// Returns the time for the last known successful navigation completion.
  14. /// </summary>
  15. public DateTime CompletionTime { get; private set; }
  16. /// <summary>
  17. /// Returns a display-friendly version of the URL.
  18. /// </summary>
  19. public string DisplayUrl { get; private set; }
  20. /// <summary>
  21. /// Returns the HTTP status code for the last known successful navigation response.
  22. /// </summary>
  23. public int HttpStatusCode { get; private set; }
  24. /// <summary>
  25. /// Returns the original URL that was entered by the user before any redirects.
  26. /// </summary>
  27. public string OriginalUrl { get; private set; }
  28. /// <summary>
  29. /// Returns the title set by the page.
  30. /// </summary>
  31. public string Title { get; private set; }
  32. /// <summary>
  33. /// Returns the transition type which indicates what the user did to move to this page from the previous page.
  34. /// </summary>
  35. public TransitionType TransitionType { get; private set; }
  36. /// <summary>
  37. /// Returns the actual URL of the page.
  38. /// </summary>
  39. public string Url { get; private set; }
  40. /// <summary>
  41. /// Returns true if this navigation includes post data.
  42. /// </summary>
  43. public bool HasPostData { get; private set; }
  44. /// <summary>
  45. /// Returns true if this object is valid.
  46. /// </summary>
  47. public bool IsValid { get; private set; }
  48. /// <summary>
  49. /// If true if this entry is the currently loaded navigation entry
  50. /// </summary>
  51. public bool IsCurrent { get; private set; }
  52. /// <summary>
  53. /// Returns the SSL information for this navigation entry.
  54. /// </summary>
  55. public SslStatus SslStatus { get; private set; }
  56. /// <summary>
  57. /// NavigationEntry
  58. /// </summary>
  59. /// <param name="completionTime">completionTime</param>
  60. /// <param name="displayUrl">displayUrl</param>
  61. /// <param name="httpStatusCode">httpStatusCode</param>
  62. /// <param name="originalUrl">originalUrl</param>
  63. /// <param name="title">title</param>
  64. /// <param name="transitionType">transitionType</param>
  65. /// <param name="url">url</param>
  66. /// <param name="hasPostData">hasPostData</param>
  67. /// <param name="isValid">isValid</param>
  68. /// <param name="isCurrent">is the current entry</param>
  69. /// <param name="sslStatus">the ssl status</param>
  70. public NavigationEntry(bool isCurrent, DateTime completionTime, string displayUrl, int httpStatusCode, string originalUrl, string title, TransitionType transitionType, string url, bool hasPostData, bool isValid, SslStatus sslStatus)
  71. {
  72. IsCurrent = isCurrent;
  73. CompletionTime = completionTime;
  74. DisplayUrl = displayUrl;
  75. HttpStatusCode = httpStatusCode;
  76. OriginalUrl = originalUrl;
  77. Title = title;
  78. TransitionType = transitionType;
  79. Url = url;
  80. HasPostData = hasPostData;
  81. IsValid = isValid;
  82. SslStatus = sslStatus;
  83. }
  84. }
  85. }