{"action":"created","issue":{"url":"https://api.github.com/repos/danikf/tik4net/issues/9","repository_url":"https://api.github.com/repos/danikf/tik4net","labels_url":"https://api.github.com/repos/danikf/tik4net/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/danikf/tik4net/issues/9/comments","events_url":"https://api.github.com/repos/danikf/tik4net/issues/9/events","html_url":"https://github.com/danikf/tik4net/issues/9","id":150697707,"number":9,"title":"\"System.ObjectDisposedException\" in System.dll with Connection.LoadAsync<T>","user":{"login":"seho85","id":5365829,"avatar_url":"https://avatars.githubusercontent.com/u/5365829?v=3","gravatar_id":"","url":"https://api.github.com/users/seho85","html_url":"https://github.com/seho85","followers_url":"https://api.github.com/users/seho85/followers","following_url":"https://api.github.com/users/seho85/following{/other_user}","gists_url":"https://api.github.com/users/seho85/gists{/gist_id}","starred_url":"https://api.github.com/users/seho85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seho85/subscriptions","organizations_url":"https://api.github.com/users/seho85/orgs","repos_url":"https://api.github.com/users/seho85/repos","events_url":"https://api.github.com/users/seho85/events{/privacy}","received_events_url":"https://api.github.com/users/seho85/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-24T20:46:43Z","updated_at":"2016-04-27T18:50:53Z","closed_at":"2016-04-27T18:33:36Z","body":"Hey Daniel,\r\n\r\nhere I am again. \r\nI found some time to play arround with tik4net.\r\n\r\nI don't think I understand the code completly but it was enough to get the another Tool command running -\r\nat least under special conditions.\r\n\r\nBefore I continoue - Thanks for your work. It gave me some great inspiration for another project.\r\n\r\nLike 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.\r\n\r\nI created a little project, named tik4net.ping, which reproduces the behaviour on my fork of tik4net https://github.com/seho85/tik4net.git\r\n\r\nWhen 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.\r\n\r\nMaybe 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. \r\n\r\nAny help is appreciated.\r\n\r\nKinds regards,\r\nSebastian\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/danikf/tik4net/issues/comments/215191167","html_url":"https://github.com/danikf/tik4net/issues/9#issuecomment-215191167","issue_url":"https://api.github.com/repos/danikf/tik4net/issues/9","id":215191167,"user":{"login":"danikf","id":13768986,"avatar_url":"https://avatars.githubusercontent.com/u/13768986?v=3","gravatar_id":"","url":"https://api.github.com/users/danikf","html_url":"https://github.com/danikf","followers_url":"https://api.github.com/users/danikf/followers","following_url":"https://api.github.com/users/danikf/following{/other_user}","gists_url":"https://api.github.com/users/danikf/gists{/gist_id}","starred_url":"https://api.github.com/users/danikf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danikf/subscriptions","organizations_url":"https://api.github.com/users/danikf/orgs","repos_url":"https://api.github.com/users/danikf/repos","events_url":"https://api.github.com/users/danikf/events{/privacy}","received_events_url":"https://api.github.com/users/danikf/received_events","type":"User","site_admin":false},"created_at":"2016-04-27T18:50:53Z","updated_at":"2016-04-27T18:50:53Z","body":"I have re-read again your question. The answer is:\r\n\r\nconnection is disposed at the end od your \"using\" block. So - make instance of 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.\r\n\r\nI have also improved connection behavior to end async load process instead of throwing exception.\r\n\r\nD"}}