Class PropertyValue
- Namespace
- AudioDeviceLib.CoreAudioApi
- Assembly
- AudioDeviceLib.dll
Represents a property value read from a Core Audio PropertyStore. This class encapsulates the property type and its value, and indicates whether the property is empty or null. The snapshot holds no unmanaged resources and requires no cleanup.
[PublicAPI]
public sealed record PropertyValue : IEquatable<PropertyValue>
- Inheritance
-
PropertyValue
- Implements
- Inherited Members
Properties
IsEmpty
Gets whether the variant type is VT_EMPTY or VT_NULL.
public bool IsEmpty { get; }
Property Value
IsSupported
Gets whether VarType is a variant type this library converts to a managed value.
public bool IsSupported { get; }
Property Value
Remarks
false means the property exists but carries a type (a vector, an array, a stream) that
is not read, so Value is null for a reason other than emptiness. Check
this before treating a null Value as the property's actual value.
Value
Gets the managed value, or null for an empty, null, or unsupported variant type.
public object? Value { get; }
Property Value
Remarks
IsEmpty and IsSupported tell the two null cases apart. Blob values are mutable byte arrays.
VarType
Gets the native variant type of the snapshot.
public VarEnum VarType { get; }
Property Value
- VarEnum