Windream: add basepath
This commit is contained in:
@@ -7,12 +7,15 @@ Public Class ConnectionBuilder
|
||||
Private ReadOnly LogConfig As LogConfig
|
||||
Private SessionReconnect As Boolean = False
|
||||
Private DriveLetter As String = "W"
|
||||
Private BasePath As String = BASE_PATH
|
||||
Private Support64Bit As Boolean = False
|
||||
Private ServerName As String = Nothing
|
||||
Private UserName As String = Nothing
|
||||
Private Password As String = Nothing
|
||||
Private Domain As String = Nothing
|
||||
|
||||
Private Const BASE_PATH As String = "\\windream\objects"
|
||||
|
||||
Public Sub New(LogConfig As LogConfig)
|
||||
Me.LogConfig = LogConfig
|
||||
End Sub
|
||||
@@ -33,9 +36,32 @@ Public Class ConnectionBuilder
|
||||
''' <returns>A IConnectionBuilder instance to allow for chaining</returns>
|
||||
Public Function WithDriveLetter(driveLetter As String) As IConnectionBuilder Implements IConnectionBuilder.WithDriveLetter
|
||||
Me.DriveLetter = driveLetter
|
||||
BasePath = String.Empty
|
||||
Return Me
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Sets the drive letter to String.Empty, use \\windream\objects as Windream base path
|
||||
''' </summary>
|
||||
''' <param name="BasePath">The windream base path, eg. \\windream\objects</param>
|
||||
''' <returns>A IConnectionBuilder instance to allow for chaining</returns>
|
||||
Public Function WithWindreamObjects(BasePath As String) As IConnectionBuilder Implements IConnectionBuilder.WithWindreamObjects
|
||||
BasePath = BasePath
|
||||
DriveLetter = String.Empty
|
||||
Return Me
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Sets the drive letter to String.Empty, use \\windream\objects as Windream base path
|
||||
''' </summary>
|
||||
''' <returns>A IConnectionBuilder instance to allow for chaining</returns>
|
||||
Public Function WithWindreamObjects() As IConnectionBuilder Implements IConnectionBuilder.WithWindreamObjects
|
||||
BasePath = BASE_PATH
|
||||
DriveLetter = String.Empty
|
||||
Return Me
|
||||
End Function
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' Sets flag in Windream class to indicate 64-bit support
|
||||
''' </summary>
|
||||
@@ -74,8 +100,8 @@ Public Class ConnectionBuilder
|
||||
''' </summary>
|
||||
''' <exception cref="Exceptions.SessionException">If there was an error while establishing the connection</exception>
|
||||
''' <returns>A Windream Object</returns>
|
||||
Public Function Connect() As Windream2 Implements IConnectionBuilder.Connect
|
||||
Return New Windream2(LogConfig, SessionReconnect, DriveLetter, Support64Bit, ServerName, UserName, Password, Domain)
|
||||
Public Function Connect() As Windream Implements IConnectionBuilder.Connect
|
||||
Return New Windream(LogConfig, SessionReconnect, DriveLetter, BasePath, Support64Bit, ServerName, UserName, Password, Domain)
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user