VirtualStorageLibrary
Search Results for

    Show / Hide Table of Contents

    Class VirtualNodeName

    Represents the name of a virtual node. This class handles the generation, validation, and comparison of node names.

    Inheritance
    object
    VirtualNodeName
    Implements
    IEquatable<VirtualNodeName>
    IComparable<VirtualNodeName>
    IComparable
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: AkiraNetwork.VirtualStorageLibrary
    Assembly: VirtualStorageLibrary.dll
    Syntax
    public class VirtualNodeName : IEquatable<VirtualNodeName>, IComparable<VirtualNodeName>, IComparable

    Constructors

    VirtualNodeName(string)

    Initializes a new instance of the VirtualNodeName class with the specified name.

    Declaration
    public VirtualNodeName(string name)
    Parameters
    Type Name Description
    string name

    The name of the node.

    Properties

    IsDot

    Indicates whether the node is a single dot representing the current directory.

    Declaration
    public bool IsDot { get; }
    Property Value
    Type Description
    bool

    true if this node is dot; otherwise, false.

    IsDotDot

    Indicates whether the node is a double dot representing the parent directory.

    Declaration
    public bool IsDotDot { get; }
    Property Value
    Type Description
    bool

    true if this node is double dot"; otherwise, false.

    IsRoot

    Indicates whether the node is the root node.

    Declaration
    public bool IsRoot { get; }
    Property Value
    Type Description
    bool

    true if this is the root node; otherwise, false.

    Name

    Gets the name of the node.

    Declaration
    public string Name { get; }
    Property Value
    Type Description
    string

    The name of this node.

    Methods

    CompareTo(VirtualNodeName?)

    Compares this instance with a specified VirtualNodeName.

    Declaration
    public int CompareTo(VirtualNodeName? other)
    Parameters
    Type Name Description
    VirtualNodeName other

    The VirtualNodeName to compare with.

    Returns
    Type Description
    int

    A value indicating the relative order of the instances being compared.

    CompareTo(object?)

    Compares this instance with a specified object.

    Declaration
    public int CompareTo(object? obj)
    Parameters
    Type Name Description
    object obj

    The object to compare with.

    Returns
    Type Description
    int

    A value indicating the relative order of the instances being compared.

    Exceptions
    Type Condition
    ArgumentException

    Thrown when the object is not a VirtualNodeName.

    Equals(VirtualNodeName?)

    Determines whether the specified VirtualNodeName is equal to this instance.

    Declaration
    public bool Equals(VirtualNodeName? other)
    Parameters
    Type Name Description
    VirtualNodeName other

    The VirtualNodeName to compare with this instance.

    Returns
    Type Description
    bool

    true if the specified VirtualNodeName is equal to this instance; otherwise, false.

    Equals(object?)

    Determines whether the specified object is equal to this instance.

    Declaration
    public override bool Equals(object? obj)
    Parameters
    Type Name Description
    object obj

    The object to compare with this instance.

    Returns
    Type Description
    bool

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

    Overrides
    object.Equals(object)

    GenerateNodeName(string)

    Generates a new node name using the specified prefix.

    Declaration
    public static VirtualNodeName GenerateNodeName(string prefix)
    Parameters
    Type Name Description
    string prefix

    The prefix for the node name.

    Returns
    Type Description
    VirtualNodeName

    The generated node name.

    Remarks

    The current implementation may be improved for better usability, including a possible re-implementation of the node name generation. Users are advised to check for updates in the documentation regularly.

    Exceptions
    Type Condition
    ArgumentException

    Thrown when the prefix is an empty string.

    GetHashCode()

    Returns a hash code for this instance.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    A hash code for this instance.

    Overrides
    object.GetHashCode()

    IsValidNodeName(VirtualNodeName)

    Checks if a node name is valid.

    Declaration
    public static bool IsValidNodeName(VirtualNodeName nodeName)
    Parameters
    Type Name Description
    VirtualNodeName nodeName

    The node name to check.

    Returns
    Type Description
    bool

    true if the node name is valid; otherwise, false.

    ResetCounter()

    Resets the counter used for node name generation.

    Declaration
    public static void ResetCounter()

    ToString()

    Returns the name of the node as a string.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    The name of the node as a string.

    Overrides
    object.ToString()

    Operators

    operator ==(VirtualNodeName?, VirtualNodeName?)

    Determines whether two VirtualNodeName instances are equal.

    Declaration
    public static bool operator ==(VirtualNodeName? left, VirtualNodeName? right)
    Parameters
    Type Name Description
    VirtualNodeName left

    The left VirtualNodeName to compare.

    VirtualNodeName right

    The right VirtualNodeName to compare.

    Returns
    Type Description
    bool

    true if the specified instances are equal; otherwise, false.

    implicit operator string(VirtualNodeName)

    Implicitly converts a VirtualNodeName to a string.

    Declaration
    public static implicit operator string(VirtualNodeName nodeName)
    Parameters
    Type Name Description
    VirtualNodeName nodeName

    The VirtualNodeName to convert.

    Returns
    Type Description
    string

    implicit operator VirtualNodeName(string)

    Implicitly converts a string to a VirtualNodeName.

    Declaration
    public static implicit operator VirtualNodeName(string name)
    Parameters
    Type Name Description
    string name

    The string to convert.

    Returns
    Type Description
    VirtualNodeName

    operator !=(VirtualNodeName?, VirtualNodeName?)

    Determines whether two VirtualNodeName instances are not equal.

    Declaration
    public static bool operator !=(VirtualNodeName? left, VirtualNodeName? right)
    Parameters
    Type Name Description
    VirtualNodeName left

    The left VirtualNodeName to compare.

    VirtualNodeName right

    The right VirtualNodeName to compare.

    Returns
    Type Description
    bool

    true if the specified instances are not equal; otherwise, false.

    Implements

    IEquatable<T>
    IComparable<T>
    IComparable

    Extension Methods

    VirtualTextFormatter.GenerateSingleTableDebugText<T>(T)
    In this article
    Back to top Generated by DocFX