Disconnect windream

This commit is contained in:
Developer01
2026-03-27 13:22:56 +01:00
parent 06e796f54f
commit bea3ccf45f
7 changed files with 18 additions and 7 deletions

View File

@@ -182,7 +182,18 @@ Public Class Windream
_sessionPassword = SessionPassword
_sessionDomain = SessionDomain
End Sub
Public Sub Disconnect()
Try
If Session IsNot Nothing AndAlso Session.aLoggedin Then
Session.Logout()
_logger.Info("Session successfully logged out.")
Else
_logger.Info("No active session to log out.")
End If
Catch ex As Exception
_logger.Error(ex, "Error while logging out session")
End Try
End Sub
Public Function GetCleanedPath(Path As String) As String
Return Regex.Replace(Path, Constants.REGEX_CLEAN_FILENAME, String.Empty)
End Function