NullModemEmulator
NullModemEmulator copied to clipboard
Running RemoveAllAsync after creating instance
problem
When I run as first method after initializaion, it does not work, because Pairs property is empty.
NullModemEmulatorManager manager = new();
var ret = await manager.RemoveAllAsync(); //returns true, but pairs is empty, so nothing is removed
workaround
As workaround, I must first run ListAsync():
NullModemEmulatorManager manager = new();
await manager.ListAsync();
var ret = await manager.RemoveAllAsync();
Yeah, you should called ListAsync first.