danikf / tik4net

Manage mikrotik routers with .NET C# code via ADO.NET like API or enjoy O/R mapper like highlevel api.
Apache License 2.0
174 stars 93 forks source link

Ease of use of commands #39

Closed AsafMag closed 6 years ago

AsafMag commented 6 years ago

There are 2 things that I feel are must have to make a greater ease of use:

  1. tag parameter could be added to all commands - sync and async as one. This is because I use multiple synchronous commands at the same time across multiple threads and their results always clash.
  2. Async commands could launch an event on ApiDoneSentence arrival - so I could clean up easily without looping over command.IsRunning.

Could you do that? :)

danikf commented 6 years ago

Hi,

1 - tik4net is not guaranteed to be thraed safe. I would recommend connection per thread. But for this behavior - I am planning to add some kind of .WithTag or connection.SendTagAlways options in the next release. 2 - I aggree with your idea. Thanks.

D