Class NavigationHistory
- Namespace
- Bunit.TestDoubles
- Assembly
- Bunit.Web.dll
public sealed class NavigationHistory : IEquatable<NavigationHistory>
- Inheritance
-
NavigationHistory
- Implements
- Inherited Members
- Extension Methods
Constructors
NavigationHistory(string, NavigationOptions)
Initializes a new instance of the NavigationHistory class.
public NavigationHistory(string uri, NavigationOptions options)
Parameters
uri
stringoptions
NavigationOptions
NavigationHistory(string, NavigationOptions)
Initializes a new instance of the NavigationHistory class.
public NavigationHistory(string uri, NavigationOptions options)
Parameters
uri
stringoptions
NavigationOptions
NavigationHistory(string, NavigationOptions, NavigationState, Exception?)
Initializes a new instance of the NavigationHistory class.
public NavigationHistory(string uri, NavigationOptions options, NavigationState navigationState, Exception? exception = null)
Parameters
uri
stringoptions
NavigationOptionsnavigationState
NavigationStateexception
Exception
Properties
Exception
Gets the exception thrown from the OnBeforeInternalNavigation handler, if any.
public Exception? Exception { get; }
Property Value
Remarks
Options
Gets the options that was specified when the
public NavigationOptions Options { get; }
Property Value
State
Gets the NavigationState associated with this history entry.
public NavigationState State { get; }
Property Value
Uri
Gets the Uri that was navigated to.
public string Uri { get; }
Property Value
Methods
Equals(NavigationHistory?)
public bool Equals(NavigationHistory? other)
Parameters
other
NavigationHistory
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
obj
object
Returns
GetHashCode()
public override int GetHashCode()
Returns
StateFromJson<T>(JsonSerializerOptions?)
Deserialize the content of Options.HistoryEntryState
into T
if it is not null.
public T? StateFromJson<T>(JsonSerializerOptions? options = null)
Parameters
options
JsonSerializerOptionsThe JsonSerializerOptions used when deserializing. If not provided, Default is used.
Returns
- T
The target type of the JSON value.
Type Parameters
T
The type to deserialize the content of Options.HistoryEntryState to.
Exceptions
- InvalidOperationException
When Options.HistoryEntryState is null.