Table of Contents

Class NavigationNodePath

Namespace
Dynamicweb.CoreUI.Navigation
Assembly
Dynamicweb.CoreUI.dll
public sealed class NavigationNodePath : IEquatable<NavigationNodePath>
Inheritance
NavigationNodePath
Implements
Inherited Members

Constructors

NavigationNodePath()

Constructs an empty path.

public NavigationNodePath()

NavigationNodePath(IEnumerable<string?>?)

Constructs a new path from the given segments.

public NavigationNodePath(IEnumerable<string?>? segments)

Parameters

segments IEnumerable<string>

List of segments that make up the path.

NavigationNodePath(string?)

Constructs a new path from the given path string.

public NavigationNodePath(string? path)

Parameters

path string

The path string to construct the NavigationNodePath from.

Properties

First

Gets the first segment in the path.

public string First { get; }

Property Value

string

IsEmpty

Gets a value indicating whether the path is empty. Equivalent to "SegmentCount == 0."

public bool IsEmpty { get; }

Property Value

bool

Last

Gets the last segment in the path.

public string Last { get; }

Property Value

string

Path

Gets the path consisting of all segments joined by the path delimiter. Path starts with the delimiter.

public string Path { get; }

Property Value

string

SegmentCount

Gets the number of segments in the path.

public int SegmentCount { get; }

Property Value

int

Segments

Gets the list of segments in the path.

public IEnumerable<string> Segments { get; }

Property Value

IEnumerable<string>

Methods

ElementAtPosition(int)

Gets the element at the given position or null.

public string? ElementAtPosition(int position)

Parameters

position int

The 1-based position.

Returns

string

The element at the position if it exists; otherwise null.

Equals(NavigationNodePath?)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(NavigationNodePath? other)

Parameters

other NavigationNodePath

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

NewWithSegment(string?)

Creates a new NavigationNodePath with the given segment appended.

public NavigationNodePath? NewWithSegment(string? segment)

Parameters

segment string

The new segment.

Returns

NavigationNodePath

A new NavigationNodePath with the given segment appended.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

ToTrimmedString()

Gets the path without the starting or ending delimiter.

public string ToTrimmedString()

Returns

string

The trimmed path.

To top