jj: Windream - improve documentation
This commit is contained in:
@@ -17,26 +17,51 @@ Public Class ConnectionBuilder
|
||||
Me.LogConfig = LogConfig
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Sets flag in Windream class to reconnect on lost connection
|
||||
''' </summary>
|
||||
''' <returns>A IConnectionBuilder instance to allow for chaining</returns>
|
||||
Public Function WithSessionReconnect() As IConnectionBuilder Implements IConnectionBuilder.WithSessionReconnect
|
||||
SessionReconnect = True
|
||||
Return Me
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Sets the drive letter of windream drive, default is "W"
|
||||
''' </summary>
|
||||
''' <param name="driveLetter">The drive letter to use</param>
|
||||
''' <returns>A IConnectionBuilder instance to allow for chaining</returns>
|
||||
Public Function WithDriveLetter(driveLetter As String) As IConnectionBuilder Implements IConnectionBuilder.WithDriveLetter
|
||||
Me.DriveLetter = driveLetter
|
||||
Return Me
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Sets flag in Windream class to indicate 64-bit support
|
||||
''' </summary>
|
||||
''' <returns>A IConnectionBuilder instance to allow for chaining</returns>
|
||||
Public Function With64BitSupport() As IConnectionBuilder Implements IConnectionBuilder.With64BitSupport
|
||||
Support64Bit = True
|
||||
Return Me
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Sets the servername in Windream class, overriding the client setting
|
||||
''' </summary>
|
||||
''' <param name="serverName"></param>
|
||||
''' <returns>A IConnectionBuilder instance to allow for chaining</returns>
|
||||
Public Function WithServerName(serverName As String) As IConnectionBuilder Implements IConnectionBuilder.WithServerName
|
||||
Me.ServerName = serverName
|
||||
Return Me
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Sets the username, password and domain in Windream class, overriding the client settings
|
||||
''' </summary>
|
||||
''' <param name="userName">The username used for the connection</param>
|
||||
''' <param name="password">The password used for the connection</param>
|
||||
''' <param name="domain">The domain used for the connection</param>
|
||||
''' <returns>A IConnectionBuilder instance to allow for chaining</returns>
|
||||
Public Function WithImpersonation(userName As String, password As String, domain As String) As IConnectionBuilder Implements IConnectionBuilder.WithImpersonation
|
||||
Me.UserName = userName
|
||||
Me.Password = password
|
||||
@@ -44,6 +69,11 @@ Public Class ConnectionBuilder
|
||||
Return Me
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' Creates a connection.
|
||||
''' </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)
|
||||
End Function
|
||||
|
||||
Reference in New Issue
Block a user