DBusObjectPath record struct

Namespace Runic.Platform.Linux.DBus in Runic.Platform.Linux.DBus 0.23.0

public readonly record struct DBusObjectPath : IEquatable<DBusObjectPath>

Inherits or implements IEquatable.

A D-Bus object path, such as /org/freedesktop/UDisks2.

Remarks

A path is /, or slash-separated elements of ASCII letters, digits and underscores without a trailing slash.

Constructors

DBusObjectPath

public DBusObjectPath(string value)

Creates a path after checking its syntax.

Exceptions

ArgumentException

value is not a valid object path.

Properties

Root

public static DBusObjectPath Root { get; }

The root path, /.

Value

public string Value { get; }

The path as text. The default value is /.

Methods

Equals

public bool Equals(DBusObjectPath other)

Compares two paths by DBusObjectPath.Value, so the default value equals DBusObjectPath.Root.

GetHashCode

public override int GetHashCode()

Inherits documentation from Object.GetHashCode.

ToString

public override string ToString()

Inherits documentation from Object.ToString.

Operators

implicit operator DBusObjectPath

public static implicit operator DBusObjectPath(string value)

Converts a string to a path.

Exceptions

ArgumentException

value is not a valid object path.