ViewRoute struct
Namespace: Arlecchino.Navigation · Assembly: Arlecchino
Where to navigate: a name in a struct, compared ordinally. Routes are strings rather than an enum because the framework has to name a screen without seeing the application's types — the generated ViewKind lives in your assembly, not in Arlecchino.
public readonly struct ViewRoute : IEquatable<ViewRoute>
Implements IEquatable<T><ViewRoute>
Constructors
| Member | Summary |
|---|---|
ViewRoute(string) | Where to navigate: a name in a struct, compared ordinally. Routes are strings rather than an enum because the framework has to name a screen without seeing the application's types — the generated ViewKind lives in your assembly, not in Arlecchino. |
Properties
| Member | Summary |
|---|---|
IsNone | Whether this is the empty route. |
Name | Name of the route. |
None | The empty route: returned from a handler to stay where you are. |
Methods
| Member | Summary |
|---|---|
Deconstruct(out string) | |
Equals(ViewRoute) | Compares routes by name, case-sensitively. |
GetHashCode() | Hash of the route name. |
ToString() | The route name, or None for the empty route. |
Constructors in detail
ViewRoute(string)
public ViewRoute(string Name);
Where to navigate: a name in a struct, compared ordinally. Routes are strings rather than an enum because the framework has to name a screen without seeing the application's types — the generated ViewKind lives in your assembly, not in Arlecchino.
Parameters
| Name | Type | Description |
|---|---|---|
Name | string | Name of the route. |
Properties in detail
IsNone
public bool IsNone { get; }
Whether this is the empty route.
Type bool
Name
public string Name { get; init; }
Name of the route.
Type string
None
public static ViewRoute None { get; }
The empty route: returned from a handler to stay where you are.
Type ViewRoute
Methods in detail
Deconstruct(out string)
public void Deconstruct(out string Name);
Parameters
| Name | Type | Description |
|---|---|---|
Name | string |
Equals(ViewRoute)
public bool Equals(ViewRoute other);
Compares routes by name, case-sensitively.
Parameters
| Name | Type | Description |
|---|---|---|
other | ViewRoute | The route to compare with. |
Returns bool — true when both name the same screen.
GetHashCode()
public override int GetHashCode();
Hash of the route name.
Returns int — The hash code.
ToString()
public override string ToString();
The route name, or None for the empty route.
Returns string — Readable form of the route.