I am trying to use the Winscp.net assembly into an existing file transfer program written in vb.net.
I am wondering why no Close method exists inside the Session class to close the current session without disposing the complete object. Sometimes it is useful to close a session and reopen it again with other credentials.
To make some tests I have added a Close method to the source code of the assembly. It looks like this:
public void Close()
Any comments if this is suitable? Or do you see any bad side effects?
In my case I had to replace an other FTP component in an existing bigger application. Creating new session instances would cause deeper changes in the program flow and application design. Due to time constrains I wanted to avoid this.
But you are right. Creating new session instances has no Performance Impact and from OO perspective, it is the cleaner solution.