0.21.0
Tmds.DBus.Protocol
In v0.17.0 support for NativeAOT safe variant handling was enabled through two types: VariantValue
for reading variants,
and Variant
for writing variants. The focus on this release is to support both reading and writing using the VariantValue
type.
This enables writing back variants that were previously read.
The Variant
type has been marked obsolete. Users should now be able to use the VariantValue
type as a direct replacement.
Note that the Dict
/Array
/Struct
types are not obsolete. They can be used for creating composite VariantValues.
The VariantValue
type now behaves different for variants that hold other variants. Such variants are not common because
usually a variant will directly hold an actual (that is: non-variant) value. Variants that hold other variants are represented
as their own VariantValue
instance with a Type
of Variant
. The nested variant value can be obtained by calling GetVariantValue
.
There are some additional breaking API changes which shouldn't affect most users because involve low-level APIs for D-Bus marshalling and signature handling.
- The
Utf8Span
type has been removed. APIs useReadOnlySpan<byte>
instead. VariantValue.GetSignature
returns aSignature
(instead of astring
).VariantValue.GetArray<T>
requires a T ofSignature
(instead of astring
) for getting arrays of signature.Reader.ReadSignature
returnsSignature
instead ofUtf8Span
.ReadSignatureAsSignature
has been removed. The newReadSignatureAsSpan
returnsReadOnlySpan<byte>
.
Tmds.DBus.Tool
The following fixes have been made to the codegen
command for the protocol API (in #307):
- Generate writable properties for Set-methods only.
- PropertyChanges: invalidated and changed are swapped.