Table of Contents

Struct Notification<T>

Namespace
Tmds.DBus.Protocol
Assembly
Tmds.DBus.Protocol.dll

Notification that indicates a value was received or that the observer completed.

public readonly struct Notification<T>

Type Parameters

T

The type of the value that was read from the message.

Inherited Members

Remarks

The completion notifications are limited to those specified with the ObserverFlags.

Properties

Exception

Returns an exception that indicates why the observer completed.

public Exception Exception { get; }

Property Value

Exception

Exceptions

InvalidOperationException

The notification is not a completion.

HasValue

Returns whether a value was successfully read from the message.

public bool HasValue { get; }

Property Value

bool

IsCompletion

Returns whether this is a completion notification.

public bool IsCompletion { get; }

Property Value

bool

State

Gets the optional state object.

public object? State { get; }

Property Value

object

Type

Gets the type of notification.

public NotificationType Type { get; }

Property Value

NotificationType

Value

Gets the value read from the message.

public T Value { get; }

Property Value

T

Exceptions

InvalidOperationException

The notification is not a value as indicated by HasValue.

Methods

Stop()

Stops the observer. No more notifications will be received.

public void Stop()

Remarks

No completion notification will be sent for the dispose.