Is there a sample how to implement disconnecting from an addon?
It seems that there is more than just:
myConnection.Disconnect();
myConnection.Options=null;
Connection.Connections.Remove(myConnection);
All of these questions are for a class deriving from the AddOnBase class with no UI — no OnButtonClick event handler to disconnect; no combobox selector OnSelectionChanged event handler or SelectedItem to get the instance of myConnection. All of the code runs directly in the OnWindowCreated handler.
I am not clear whether the code to disconnect should be invoked async.
Thanks
Comment