You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
here I am again.
I found some time to play arround with tik4net.
I don't think I understand the code completly but it was enough to get the another Tool command running -
at least under special conditions.
Before I continoue - Thanks for your work. It gave me some great inspiration for another project.
Like told before I implemented MikroTik ping command, but I occured some trouble with an "System.ObjectDisposedException". It seams that the async call is not working, or I am missing something.
When in the tik4net.ping project, in the file MainWindow.xaml.cs, in the method button_Click..., the non blocking delay loop is commented out the exception is thrown.
Maybe I am missing somethinh here, because I am not very familiar with async calls, but from my understanding of an async call it should work in my WPF example too.
Any help is appreciated.
Kinds regards,
Sebastian
The text was updated successfully, but these errors were encountered:
I have re-read again your question. The answer is:
connection is disposed at the end od your "using" block. So - create/open instance of mikrotik connection during aplication start (and dispose it at the end) or wait for command response before you dispose connection object. You can not dispose connection and expect that you can get results from it.
I have also improved connection behavior to end async load process instead of throwing exception.
I already assumed that the failure was on my side. I somehow overlooked the behaviour of the using statement.
When I got the cosmetic work on my other changes to the code finished, and when got a litlte bit more familar with using github, i'll gonna provide my changes to the base repository.
Hey Daniel,
here I am again.
I found some time to play arround with tik4net.
I don't think I understand the code completly but it was enough to get the another Tool command running -
at least under special conditions.
Before I continoue - Thanks for your work. It gave me some great inspiration for another project.
Like told before I implemented MikroTik ping command, but I occured some trouble with an "System.ObjectDisposedException". It seams that the async call is not working, or I am missing something.
I created a little project, named tik4net.ping, which reproduces the behaviour on my fork of tik4net https://github.com/seho85/tik4net.git
When in the tik4net.ping project, in the file MainWindow.xaml.cs, in the method button_Click..., the non blocking delay loop is commented out the exception is thrown.
Maybe I am missing somethinh here, because I am not very familiar with async calls, but from my understanding of an async call it should work in my WPF example too.
Any help is appreciated.
Kinds regards,
Sebastian
The text was updated successfully, but these errors were encountered: