// Copyright © 2010-2016 The CefSharp Authors. All rights reserved. // // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. using System; namespace CefSharp { /// /// Represents an entry in navigation history. /// public struct NavigationEntry { private DateTime completionTime; private string displayUrl; private int httpStatusCode; private string originalUrl; private string title; private TransitionType transitionType; private string url; private bool hasPostData; private bool isValid; private bool isCurrent; private SslStatus? sslStatus; /// /// NavigationEntry /// /// completionTime /// displayUrl /// httpStatusCode /// originalUrl /// title /// transitionType /// url /// hasPostData /// isValid /// is the current entry /// the ssl status public NavigationEntry(bool isCurrent, DateTime completionTime, string displayUrl, int httpStatusCode, string originalUrl, string title, TransitionType transitionType, string url, bool hasPostData, bool isValid, SslStatus? sslStatus) { this.isCurrent = isCurrent; this.completionTime = completionTime; this.displayUrl = displayUrl; this.httpStatusCode = httpStatusCode; this.originalUrl = originalUrl; this.title = title; this.transitionType = transitionType; this.url = url; this.hasPostData = hasPostData; this.isValid = isValid; this.sslStatus = sslStatus; } /// /// Returns the time for the last known successful navigation completion. /// public DateTime CompletionTime { get { return completionTime; } } /// /// Returns a display-friendly version of the URL. /// public string DisplayUrl { get { return displayUrl; } } /// /// Returns the HTTP status code for the last known successful navigation response. /// public int HttpStatusCode { get { return httpStatusCode; } } /// /// Returns the original URL that was entered by the user before any redirects. /// public string OriginalUrl { get { return originalUrl; } } /// /// Returns the title set by the page. /// public string Title { get { return title; } } /// /// Returns the transition type which indicates what the user did to move to this page from the previous page. /// public TransitionType TransitionType { get { return transitionType; } } /// /// Returns the actual URL of the page. /// public string Url { get { return url; } } /// /// Returns true if this navigation includes post data. /// public bool HasPostData { get { return hasPostData; } } /// /// Returns true if this object is valid. /// public bool IsValid { get { return isValid;} } /// /// If true if this entry is the currently loaded navigation entry /// public bool IsCurrent { get { return isCurrent; } } /// /// Returns the SSL information for this navigation entry. /// public SslStatus? SslStatus { get { return sslStatus; } } } }