DBusMethodCall record

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

public sealed record DBusMethodCall : IEquatable<DBusMethodCall>

Inherits or implements IEquatable.

A method call: its destination, object, interface, member and arguments.

Parameters

Destination

The bus name of the service, such as org.freedesktop.UDisks2, or null on a peer-to-peer connection.

Path

The object.

Interface

The interface, such as org.freedesktop.UDisks2.Filesystem.

Member

The method name.

Remarks

Calls compare by content: their names, options and arguments, which compare as DBusValue does.

Constructors

DBusMethodCall

public DBusMethodCall(string? Destination, DBusObjectPath Path, string Interface, string Member)

A method call: its destination, object, interface, member and arguments.

Parameters

Destination

The bus name of the service, such as org.freedesktop.UDisks2, or null on a peer-to-peer connection.

Path

The object.

Interface

The interface, such as org.freedesktop.UDisks2.Filesystem.

Member

The method name.

Remarks

Calls compare by content: their names, options and arguments, which compare as DBusValue does.

Properties

Arguments

public ImmutableArray<DBusValue> Arguments { get; init; }

The arguments, each carrying its own signature.

Destination

public string? Destination { get; init; }

The bus name of the service, such as org.freedesktop.UDisks2, or null on a peer-to-peer connection.

Interface

public string Interface { get; init; }

The interface, such as org.freedesktop.UDisks2.Filesystem.

Member

public string Member { get; init; }

The method name.

Options

public DBusCallOptions Options { get; init; }

The call's options.

Path

public DBusObjectPath Path { get; init; }

The object.

Timeout

public TimeSpan? Timeout { get; init; }

How long to wait for the reply; null, the default, waits until the bus or the service replies or the call is cancelled.

Exceptions

ArgumentOutOfRangeException

The value is zero, negative other than Timeout.InfiniteTimeSpan, or longer than Task.WaitAsync accepts.

Remarks

When the time passes, the call throws DBusException with DBusException.NoReply and a later reply is ignored. The service may still have carried out the call. Timeout.InfiniteTimeSpan also waits without a limit.

Methods

Equals

public bool Equals(DBusMethodCall? other)

Compares two calls by content.

GetHashCode

public override int GetHashCode()

Inherits documentation from Object.GetHashCode.