Skip to main content

StorageListElement

Namespace: Busy.Bar

System.Text.Json's polymorphic deserialization requires the "type" discriminator to be the first property in the JSON object, or it throws NotSupportedException. Confirmed against a real BUSY Bar device (see RealDeviceFixtureTests) that "type" is always first for both "file" and "dir" elements returned by GET /storage/list — treated as a confirmed assumption, not a theoretical risk.

public abstract record class StorageListElement : System.IEquatable`1[[Busy.Bar.StorageListElement, BusyBar, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]

Inheritance Object → StorageListElement
Implements IEquatable<StorageListElement>
Attributes NullableContextAttribute, NullableAttribute, RequiredMemberAttribute, JsonPolymorphicAttribute, JsonDerivedTypeAttribute, JsonDerivedTypeAttribute

Properties​

Name​

File or directory name.

public required string Name { get; init; }

Property Value​

String

Constructors​

StorageListElement(StorageListElement)​

protected StorageListElement(StorageListElement original)

Parameters​

original StorageListElement

StorageListElement()​

Caution​

Constructors of types with required members are not supported in this version of your compiler.


protected StorageListElement()