NullModemEmulator icon indicating copy to clipboard operation
NullModemEmulator copied to clipboard

Running RemoveAllAsync after creating instance

Open balonmilan opened this issue 8 months ago • 1 comments

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();

balonmilan avatar Apr 25 '25 09:04 balonmilan

Yeah, you should called ListAsync first.

seayxu avatar Apr 29 '25 05:04 seayxu