Skip to content

Running RemoveAllAsync after creating instance #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
balonmilan opened this issue Apr 25, 2025 · 1 comment
Open

Running RemoveAllAsync after creating instance #2

balonmilan opened this issue Apr 25, 2025 · 1 comment

Comments

@balonmilan
Copy link

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();
@seayxu
Copy link
Collaborator

seayxu commented Apr 29, 2025

Yeah, you should called ListAsync first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants