-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed json usb device list not deserializing
- Loading branch information
Showing
1 changed file
with
9 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,18 @@ | ||
using System.Collections.Immutable; | ||
|
||
namespace WASMSerialTerminal { | ||
namespace WASMSerialTerminal { | ||
internal class USBDevice { | ||
public string ID { get; private set; } | ||
public string Name { get; private set; } | ||
|
||
public USBDevice(string id, string name) { | ||
ID = id; | ||
Name = name; | ||
} | ||
public required string ID { get; set; } | ||
public required string Name { get; set; } | ||
} | ||
|
||
internal class USBVendor { | ||
public string ID { get; private set; } | ||
public string Name { get; private set; } | ||
public ImmutableArray<USBDevice> Devices { get; private set; } | ||
|
||
public USBVendor(string iD, string name, ImmutableArray<USBDevice> devices) { | ||
ID = iD; | ||
Name = name; | ||
Devices = devices; | ||
} | ||
public required string ID { get; set; } | ||
public required string Name { get; set; } | ||
public required List<USBDevice> Devices { get; set; } | ||
} | ||
|
||
internal class USBVendorList { | ||
public ImmutableArray<USBVendor> Vendors { get; private set; } | ||
public string Version { get; private set; } | ||
public string Date { get; private set; } | ||
|
||
public USBVendorList(ImmutableArray<USBVendor> vendors, string version, string date) { | ||
Vendors = vendors; | ||
Version = version; | ||
Date = date; | ||
} | ||
public required List<USBVendor> Vendors { get; set; } | ||
public required string Version { get; set; } | ||
public required string Date { get; set; } | ||
} | ||
} |